catchorg / Clara

A simple to use, composable, command line parser for C++ 11 and beyond
Boost Software License 1.0
649 stars 67 forks source link

Use of `cassert` infects all users #43

Open jsren opened 6 years ago

jsren commented 6 years ago

The use of the cassert header, and thus inclusion of the lowercase assert macro, prevents users importing this library from having "assert" as any identifier or namespace, which doesn't tend to play well with larger projects not making use of this header, and certainly doesn't play well with C++11 unit test libraries!

A simple fix, as cassert is essentially guaranteed to contain nothing but assert, would be to #undef assert at the end of the header. However the special stitch script complains because there is no visible counterpart #define assert, making this a lot less trivial.