Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile on gcc4.7 when c++11 is enabled (fix attached) #24

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 12 Dec 2013 at 2:46

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant