catchorg / Clara

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

Make second Argument of Args( int argc, char *argv[] ) const #64

Closed red-angry-bird closed 6 years ago

red-angry-bird commented 6 years ago

Hey there,

the second argument of clara::Args should be const because main(int, const char*[]) is conform to the standard.

horenmar commented 6 years ago

No, it does not. Only int main(int, char**) and int main() (and various spellings thereof) are standard conforming.

Also the current version of Args::Args has two overloads, one for init list of std::strings and Args(int, char const* const*). Unlike char const**, char const* const* can accept arguments of type char**.

red-angry-bird commented 6 years ago

Thanks for your fast and particularized response