User-defined literals, C++14
I'm trying to insert C++14 style user-defined literal suffixes into my code:
Code:
# include <iostream>
# include <string>
int main()
{
auto str = "hello world"s;
}
Getting some variant of the following error message with GCC 4.9 (via C::B), MinGW7.1 (via nuwen-distro) and also online at coliru and cpp.sh:
Code:
error: unable to find numeric literal operator 'operator""i'|
note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Trying to compile with either of the above doesn't help either. Any suggestions re using such literals v welcome. Thanks.