diff --git a/source/context.cpp b/source/context.cpp index 5aea93e9..d41ebdeb 100644 --- a/source/context.cpp +++ b/source/context.cpp @@ -116,7 +116,7 @@ PYBIND11_MODULE({2}, root_module) {{ std::vector< std::pair > sub_modules {{ {3} }}; - for(auto &p : sub_modules ) modules[p.first.size() ? p.first+"::"+p.second : p.second] = modules[p.first].def_submodule( mangle_namespace_name(p.second).c_str(), ("Bindings for " + p.first + "::" + p.second + " namespace").c_str() ); + for(auto &p : sub_modules ) modules[ !p.first.empty() ? p.first+"::"+p.second : p.second] = modules[p.first].def_submodule( mangle_namespace_name(p.second).c_str(), ("Bindings for " + p.first + "::" + p.second + " namespace").c_str() ); //pybind11::class_>(M(""), "_encapsulated_data_");