#include <iostream> class test { long double x; public: friend test operator""_UNIT(long double v) { test t; t.x = v; return t; } }; int main() { test T = 10.0_UNIT; return 0; }
Standard input is empty
prog.cpp: In function 'int main()':
prog.cpp:20:14: error: unable to find numeric literal operator 'operator""_UNIT'
test T = 10.0_UNIT;
^
Standard output is empty