Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
Composite pattern
Last Class Quiz - Working with Hash Table
pack expansion
What's the problem with this?
Crow unordered_map Quiz
11/18
2574 EC
Palindrome Recursive Function Example
Graphs Iteration1 Undirected.
Struct memory ordering