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

[Wishlist] Allow nested namespaces #18

Open
mbr0wn opened this issue Mar 13, 2020 · 0 comments
Open

[Wishlist] Allow nested namespaces #18

mbr0wn opened this issue Mar 13, 2020 · 0 comments

Comments

@mbr0wn
Copy link

mbr0wn commented Mar 13, 2020

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.

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

No branches or pull requests

1 participant