Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C++ instantiation
#include <iostream> #include <string> template <int& T>struct NonTypeParameter { }; template <typename T> struct Holder{ static int init; }; int lala=0; template <typename T> struct InitCRTP{ using dummy=NonTypeParameter<Holder<T>::init>; }; template <typename T> int Holder<T>::init = lala++; class WantInit : public InitCRTP<WantInit>{}; int main(){ std::cout << lala << std::endl; }
run
|
edit
|
history
|
help
0
problem_binary_4
Wide string to lowercase
hangman
C++ move/copy constructor and assignment demo
Even Odd
asock
This is the first one
_countof constexpr
students grade
reference