mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Fuck you, clang: http://stackoverflow.com/a/8629943/5280922
This commit is contained in:
parent
aff7688620
commit
3abcf7f086
|
@ -55,7 +55,7 @@ args = parser.parse_args()
|
|||
# general variables
|
||||
include = [ '.', './include' ]
|
||||
depends = [os.path.join('Catch', 'include')]
|
||||
cxxflags = [ '-Wall', '-Wextra', '-pedantic', '-pedantic-errors', '-std=c++14', '-ftemplate-depth=512' ]
|
||||
cxxflags = [ '-Wall', '-Wextra', '-pedantic', '-pedantic-errors', '-std=c++14', '-ftemplate-depth=1024' ]
|
||||
cxxflags.extend([p for p in re.split("( |\\\".*?\\\"|'.*?')", args.cxx_flags) if p.strip()])
|
||||
ldflags = []
|
||||
script_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||
|
|
|
@ -75,10 +75,10 @@ int main() {
|
|||
// the first argument of construction is the name
|
||||
// second is the constructor types
|
||||
// then the rest are function name and member function pointer pairs
|
||||
sol::usertype<vector> udata("vector", ctor, "is_unit", &vector::is_unit);
|
||||
sol::usertype<vector> utype(ctor, "is_unit", &vector::is_unit);
|
||||
|
||||
// then you must register it
|
||||
lua.set_usertype("vector", udata);
|
||||
lua.set_usertype("vector", utype);
|
||||
// You can throw away the usertype after you set it: you do NOT
|
||||
// have to keep it around
|
||||
// cleanup happens automagically
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace function_detail {
|
|||
|
||||
template <typename F, F fx>
|
||||
inline int c_call(lua_State* L) {
|
||||
return detail::static_trampoline<function_detail::call_wrapper_entry<F, fx>>(L);
|
||||
return detail::c_trampoline(L, function_detail::call_wrapper_entry<F, fx>);
|
||||
}
|
||||
} // sol
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user