What steps will reproduce the problem?
1. Add SLB3 on a c++11 project
2. Compile it with -std=c++11 and g++ 4.7
What is the expected output? What do you see instead?
With gcc4.7 it fails to build and the error message is:
/slb_test/slb/include/SLB3/internal/../internal/value_primitives_ptr.h: In
static member function 'static void SLB3::Value<const void*>::Push(lua_State*,
const void*)':
/slb_test/slb/include/SLB3/internal/../internal/value_primitives_ptr.h:73:1:
error: unable to find string literal operator 'operator"" Name'
With gcc4.8 the same error is a warning:
/slb_test/slb/include/SLB3/info.h:175:41: warning: invalid suffix on literal;
C++11 requires a space between literal and identifier [-Wliteral-suffix]
const char* name() const { return "const "Name" &"; }
I've attached a patch that fixes the issue and it also adds a SLB3 prefix in
some macros.
Original issue reported on code.google.com by
godl...@ancient-ritual.comon 12 Dec 2013 at 2:46Attachments: