Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Enum flags operator example
//clang 3.7.0 #include <iostream> enum Example { a = 1, b = 2, c = 4, }; Example fun() { return Example::b; } Example operator|(Example x, Example y) { return static_cast<Example>(static_cast<int>(x) | static_cast<int>(y)); } int main() { auto e = fun(); e = e | Example::c; }
run
|
edit
|
history
|
help
0
back_inserter example
Balanced Insert Heap Example
Optional conversions
Tree Example
numeric_limits
Throttle Example using a circular queue (Push all but 2 less than maxSize; then pop all but 2 of current size)
SimpleList Example
pointer to complete array does not convert implicitly to pointer to array of unknown bound
Move Construction
<string> No indirect include of <errno.h>