Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Long/compound namespaces when using C++/CLI

I'm working on a project where a mixture of C# (95%) and C++/CLI (5%) are used.

The namespace naming convention I'm aiming for is the good old Company.Technology.Etc.. This works perfectly fine for C#. Now, can I carry this across to C++ classes? I read here that compound namespaces aren't supported in C++.

Am I stuck with the clumsy

namespace Company {
    namespace Technology {
        namespace Etc {
           ...
        }
    }
}

in order to stay consistent?

Is it worth trying to stay consistent?

like image 257
biozinc Avatar asked Mar 23 '10 13:03

biozinc


1 Answers

Yes, you're stuck with it, see this link. In my opinion it's worth using it as it is more readable and manageable to use namespaces. I normally do so in native C++ also.

like image 79
Simon Linder Avatar answered Sep 30 '22 20:09

Simon Linder