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 b = get_value(); bool b = get_value_2(); }
run
|
edit
|
history
|
help
0
Math1
wasm test for node
sfinae
back_inserter example
problem_name_4
Class operator overloading the subscript and boundary check for array
bubble sort
Own initialization
ternary test
hello world 3