mirror of
https://github.com/VictorEijkhout/TheArtOfHPC_vol3_cppf08programming.git
synced 2026-01-24 22:44:48 +09:00
15 lines
260 B
C++
15 lines
260 B
C++
#include <iostream>
|
|
using namespace std;
|
|
|
|
enum class bits : int { one=1, two=2 };
|
|
|
|
int operator |( const bits& x,const bits& y ) {
|
|
return static_cast<int>(x) | static_cast<int>(y);
|
|
};
|
|
|
|
int main() {
|
|
cout << ( bits::one | bits::two ) << '\n';
|
|
|
|
return 0;
|
|
}
|