On most compilers (gcc, clang) you can actually have a nested namespace. This bit me, because MSVC doesn't let you do that by default. Maybe there's a way that a nested namespace can be detected and expanded in the generated code.
To reproduce, simply try following the instructions with
cmrc_add_resource_library(foo-resources ALIAS foo::rc NAMESPACE foo::bar ...)
And then keep going. In the generated lib.cpp file you'll see
namespace foo::bar {
....which I think is legal C++17. I'm surprised that my gcc didn't choke (it was set to C++14), but MSVC for sure didn't like it. If this can be autoexpanded to
namespace foo { namespace bar {
(and then again on the closing braces), this will work just fine.
On most compilers (gcc, clang) you can actually have a nested namespace. This bit me, because MSVC doesn't let you do that by default. Maybe there's a way that a nested namespace can be detected and expanded in the generated code.
To reproduce, simply try following the instructions with
And then keep going. In the generated
lib.cpp
file you'll see....which I think is legal C++17. I'm surprised that my gcc didn't choke (it was set to C++14), but MSVC for sure didn't like it. If this can be autoexpanded to
(and then again on the closing braces), this will work just fine.