Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Optional conversions
struct Optional { explicit operator bool() { return true; } }; bool get_value() { Optional op; return op; } bool get_value_2() { Optional op; return !!op; } int main() { bool b1 = get_value(); bool b2 = get_value_2(); (void)b1; (void)b2; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
back_inserter example
Test bitfields with unnamed union
DESim Example Starter Code
STL stack
sort
Throttle Example in C++
Graphs Iteration1 Undirected.
problem_name_2
MPL 2-1
Maze problem solution
Please log in to post a comment.