#include <iostream>using namespace std; template <std::size_t N>constexpr void f() { static_assert(N == 42, "ERROR TEXT");} int main() { f<43>(); return 0;}
Standard input is empty
prog.cpp: In instantiation of ‘constexpr void f() [with long unsigned int N = 43]’: prog.cpp:12:7: required from here prog.cpp:7:19: error: static assertion failed: ERROR TEXT static_assert(N == 42, "ERROR TEXT"); ~~^~~~~
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!