Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Static cast of Enum
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <iostream> int main() { int zero = 0; int five = 5; enum TestEnum { TestEnum_One = 1, TestEnum_Two = 2, TestEnum_Three = 3, TestEnum_Four = 4, }; std::cout << static_cast<TestEnum>(zero) << ' ' << static_cast<TestEnum>(five); }
run
|
edit
|
history
|
help
0
Dices by GOOSE
Hello World
parantheses matching using stack in C++ - test
#31
throwing std::function on MSVC is dangerous
It complies!
dump_own_process.cpp
map_file_mangling
Spirit Lex combining token_id's with semantic actions
Redeclare with auto