Skip to content

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

@GoogleCodeExporter

Description

@GoogleCodeExporter
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.com on 12 Dec 2013 at 2:46

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions