arun11299 / cpp-subprocess

Subprocessing with modern C++
Other
456 stars 90 forks source link

Remove trailing semicolons on namespace decls #45

Closed adamkewley closed 5 years ago

adamkewley commented 5 years ago

Required to build with -pedantic compiler flag under g++ 7.4.0:

Given test-pedantic.cpp:

#include "subprocess.hpp"  // make sure it's in the compilation unit                                                                        

int main() {                                                                                                                                
    return 0;                                                                                                                               
}

Before:

adam@laptop:~/cpp-subprocess$ g++ -Werror -Wall -pedantic test-pedantic.cpp
In file included from test-pedantic.cpp:1:0:
subprocess.hpp:524:2: error: extra ‘;’ [-Werror=pedantic]
 }; // end namespace util
  ^
subprocess.hpp:1071:2: error: extra ‘;’ [-Werror=pedantic]
 }; // end namespace detail
  ^
subprocess.hpp:1848:2: error: extra ‘;’ [-Werror=pedantic]
 }; // end namespace detail
  ^
subprocess.hpp:1957:2: error: extra ‘;’ [-Werror=pedantic]
 };

After:

adam@laptop:~/cpp-subprocess$ g++ -Werror -Wall -pedantic test-pedantic.cpp 
adam@laptop:~/cpp-subprocess$