cldoc
cldoc copied to clipboard
C++11 deleted constructor and assignment
If I delete the default copy constructor and assignment operator with C++11 syntax
Type (const Type &)=delete; and Type &operator=(const Type &)=delete then cldoc generates documentation stubs for the functions as if they were present and did something interesting. Without the mentioned declarations they disappear from the documentation as they should.
A workaround is to handle the deletions using a macro, much like DISALLOW_COPY_AND_ASSIGN in Google's C++ style guide. Then cldoc can be run with something like -DCLDOC and such macros #ifdef'd away.
This information is not currently available afaik, but we can probably do something with obtaining the tokens and simply checking if we get '=' 'delete' at the end of the declaration.
For people following along at home, this is still happening in current master, and documents constructors written
Unit() = delete;
as
Unit ( )
suggesting that the constructor is available.