Add attribute to support inline namespaces in C++/CLI.#781
Add attribute to support inline namespaces in C++/CLI.#781jkoritzinsky merged 3 commits intodotnet:masterfrom tgani-msft:tgani-msft/cpp-inline-namespace
Conversation
A new assembly-scope custom attribute [CppInlineNamespace(string dottedName)] has been added to implement inline namespaces in C++/CLI. For every inline namespace encountered in a translation unit, the C++ compiler will emit this attribute with the fully scoped name, in CLR dotted form, as the argument for the attribute.
|
cc: @terrajobst |
|
Please file an issue with the proposed API plus some more explanation. Also, it would help to see some C++ sample code to understand what inline namespace is. |
|
Filed #783 |
|
@jkoritzinsky looks like I have to add the attribute class in a reference assembly as well? Where? |
Thanks. I've added some questions there. |
|
@jkoritzinsky I would appreciate help getting this through. I mis-remembered that this had been merged but this is blocked due to failures like this: .packages\microsoft.dotnet.apicompat\5.0.0-beta.19608.1\build\Microsoft.DotNet.ApiCompat.targets(143,5): error : TypesMustExist : Type 'System.Runtime.CompilerServices.CppInlineNamespaceAttribute' does not exist in the reference but it does exist in the implementation. Where/how does this need to be fixed? Thanks. |
|
You'll need to also add a definition of the type in |
|
@jkoritzinsky I already have that change (actually the only change I have in this PR). I think it also needs to be duplicated somewhere else. I would have assumed that the refs were generated automatically? |
|
Sorry swap the last src in that path with ref. That’s the file you need to edit. |
|
Yes, thanks. |
A new assembly-scope custom attribute
[CppInlineNamespace(string dottedName)]
has been added to implement inline namespaces in C++/CLI. For every
inline namespace encountered in a translation unit, the C++ compiler
will emit this attribute with the fully scoped name, in CLR dotted
form, as the argument for the attribute.