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

Fix compiler error: extra ‘;’ [-Werror=pedantic]" #47

Closed claremacrae closed 6 years ago

claremacrae commented 6 years ago

The current code won't compile for me with maximum warning levels, and warnings as errors

Command line used to trigger error was: /usr/bin/c++ -I.../Clara/include -W -Werror -Wall -Wextra -pedantic -g -std=gnu++11

/usr/bin/c++ --version
c++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
...
claremacrae commented 6 years ago

I looked at a number of those build failures, and I can't see what they have to do with my change e.g. https://travis-ci.org/catchorg/Clara/jobs/325615324 The command "curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -" failed and exited with 2 during .

philsquared commented 6 years ago

Thanks Clare - I've noticed that Travis builds have been a bit flakey recently (at least on Catch) - I think what you're seeing is just an intermittent thing. Thanks for this fix. I've also now added the -pedantic flag to the CMake build (on a branch for now until I merge this fix in and see it build clean).