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
hangman
rvalue lifetime
Dices by GOOSE
Noexcept
Buggy Strcat
MSVC bug in __fastcall implementation !!!
test
Structured Member Value Access Using Structure Member Pointer and Variadic Templates
Regex failure
const reference life time extension