/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby,
C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
#include <iostream>
#include <type_traits>
template<typename E>
E operator|(E lhs,E rhs){
typedef typename
std::underlying_type<E>::type underlying;
return static_cast<E>(
static_cast<underlying>(lhs)
| static_cast<underlying>(rhs));
}
enum FLG {F0= (1u << 0) , F1= (1u << 1)};
int main()
{
auto f = F0 | F1;
std::cout << static_cast<int>(f) << std::endl;
}