[cfe-users] Making private types public

Volker Weißmann via cfe-users cfe-users at lists.llvm.org
Sun Jan 3 16:12:26 PST 2021


Hello,

If you define a type privately (or protected) like this:

class c {

     class priv{};

};

then the writing "c::priv" outside of the class c will generate the 
error "'class c::priv' is private within this context". This is really 
bad for me, because I'm currently writing a tool that generates Rust-C++ 
wrappers. I'm thinking of writing a PR, that would add a command line 
option to clang that would make clang treat all type definitions as if 
there would be a "public:" in front of them. I'm asking if anyone wants 
to tell me that this is a bad idea or wants to give me advice.



Greetings

Volker Weißmann



More information about the cfe-users mailing list