Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
constexpr expirements
//g++ 5.4.0 #include <iostream> constexpr int arr0[5] = { 1, 2, 3, 4, 5 }; constexpr const int arr1[5] = { 1, 2, 3, 4, 5 }; int arr2[5] = { 1, 2, 3, 4, 5 }; const int arr3[5] = { 1, 2, 3, 4, 5 }; constexpr int func0() { return arr0[2]; } constexpr int func1() { return arr1[2]; } //constexpr int func2() { return arr2[2]; } // Ошибка //constexpr int func3() { return arr3[2]; } // Ошибка int main() { constexpr int i0 = func0(); constexpr int i1 = func1(); //constexpr int i2 = func2(); //constexpr int i3 = func3(); }
run
|
edit
|
history
|
help
0
Travel Buddy
¡Arriba, Papalotes, Arriba! v2
a ko z and z ko n string printing
New wall
Reminder
DP Optimization another kind
PayTax
HelloWorldExample
g++ -g bug
TypeSizeTest