Closed bdangit closed 5 years ago
Furthermore, tested compiling with -std=c++11
and -std=c++14
. No errors and all tests work.
Hi @arun11299, I updated the PR based on your comments. I have to admit that I didn't realize noexcept
had the ability to resolve expressions that way. With that I brought back the throw
within the function since that was the intention.
I compiled against c++11
, c++14
, and c++17
. No warnings/errors and all tests pass.
cpp-subprocess: building test/test
cpp-subprocess: building test/test_cat
cpp-subprocess: building test/test_env
cpp-subprocess: building test/test_err_redirection
cpp-subprocess: building test/test_ret_code
cpp-subprocess: building test/test_split
cpp-subprocess: building test/test_subprocess
/src /src
cpp-subprocess: Running post-compile tests
/src/test /src /src
cpp-subprocess: executing test/test
bufsize opt
exe opt
cpp-subprocess: executing test/test_cat
Test::test_cat_pipe_redirection
END_TEST
Test::test_cat_file_redirection
END_TEST
44112
Test::test_buffer_growth_threaded_comm
44112
END_TEST
cpp-subprocess: executing test/test_env
ENV1 = VALUE-1
ENV2 = VALUE-2
ENV3 = VALUE-3
cpp-subprocess: executing test/test_err_redirection
-1
cpp-subprocess: executing test/test_ret_code
Test::test_poll_ret_code
template <typename Buffer>
template <typename T>
template <typename T>
template <typename Func>
template <typename T>
template <typename... T> struct param_pack{};
template <typename F
template <typename F>
template <typename F
template <typename F
template <typename... Args>
template <typename... Args>
template <typename F
template <typename F
template<typename F
template<typename F
template<typename... Args>
template<typename... Args>
template<typename... Args>
template <typename... Args>
template <typename... Args>
template<typename... Args>
retcode: 0
cpp-subprocess: executing test/test_split
a
b
c
5
cpp-subprocess: executing test/test_subprocess
total 5624
-rw-r--r-- 1 root root 322 Oct 8 04:44 cat_fredirect.txt
-rwxr-xr-x 1 root root 91 Oct 5 17:36 env_script.sh
-rwxr-xr-x 1 root root 164048 Oct 8 04:44 test
-rw-r--r-- 1 root root 944 Oct 5 17:36 test.cc
-rwxr-xr-x 1 root root 1293920 Oct 8 04:44 test_cat
-rwxr-xr-x 1 root root 1450 Oct 5 17:36 test_cat.cc
-rwxr-xr-x 1 root root 681008 Oct 8 04:44 test_env
-rw-r--r-- 1 root root 347 Oct 5 17:36 test_env.cc
-rwxr-xr-x 1 root root 633704 Oct 8 04:44 test_err_redirection
-rw-r--r-- 1 root root 266 Oct 5 17:36 test_err_redirection.cc
-rwxr-xr-x 1 root root 1283072 Oct 8 04:44 test_ret_code
-rw-r--r-- 1 root root 776 Oct 5 17:36 test_ret_code.cc
drwxr-xr-x 3 root root 96 Oct 5 17:36 test_ret_code.dSYM
-rwxr-xr-x 1 root root 239712 Oct 8 04:44 test_split
-rw-r--r-- 1 root root 844 Oct 5 17:36 test_split.cc
-rwxr-xr-x 1 root root 1382912 Oct 8 04:44 test_subprocess
-rwxr-xr-x 1 root root 1421 Oct 5 17:36 test_subprocess.cc
-rwxr-xr-x 1 root root 1667 Oct 5 17:36 write_err.sh
-rw-r--r-- 1 root root 23040 Oct 8 04:44 write_err.txt
0
four
five
template <typename Buffer>
template <typename T>
template <typename T>
template <typename Func>
template <typename T>
template <typename... T> struct param_pack{};
template <typename F
template <typename F>
template <typename F
template <typename F
template <typename... Args>
template <typename... Args>
template <typename F
template <typename F
template<typename F
template<typename F
template<typename... Args>
template<typename... Args>
template<typename... Args>
template <typename... Args>
template <typename... Args>
template<typename... Args>
template <typename... Args>
template <typename... Args>
template <typename F, typename... Args>
template <typename F, typename... Args>
template<typename F, typename... Args>
template<typename F, typename... Args>
template<typename... Args>
template<typename... Args>
template<typename... Args>
template <typename... Args>
template <typename... Args>
template<typename... Args>
total 5624
-rw-r--r-- 1 root root 322 Oct 8 04:44 cat_fredirect.txt
-rwxr-xr-x 1 root root 91 Oct 5 17:36 env_script.sh
-rwxr-xr-x 1 root root 164048 Oct 8 04:44 test
-rw-r--r-- 1 root root 944 Oct 5 17:36 test.cc
-rwxr-xr-x 1 root root 1293920 Oct 8 04:44 test_cat
-rwxr-xr-x 1 root root 1450 Oct 5 17:36 test_cat.cc
-rwxr-xr-x 1 root root 681008 Oct 8 04:44 test_env
-rw-r--r-- 1 root root 347 Oct 5 17:36 test_env.cc
-rwxr-xr-x 1 root root 633704 Oct 8 04:44 test_err_redirection
-rw-r--r-- 1 root root 266 Oct 5 17:36 test_err_redirection.cc
-rwxr-xr-x 1 root root 1283072 Oct 8 04:44 test_ret_code
-rw-r--r-- 1 root root 776 Oct 5 17:36 test_ret_code.cc
drwxr-xr-x 3 root root 96 Oct 5 17:36 test_ret_code.dSYM
-rwxr-xr-x 1 root root 239712 Oct 8 04:44 test_split
-rw-r--r-- 1 root root 844 Oct 5 17:36 test_split.cc
-rwxr-xr-x 1 root root 1382912 Oct 8 04:44 test_subprocess
-rwxr-xr-x 1 root root 1421 Oct 5 17:36 test_subprocess.cc
-rwxr-xr-x 1 root root 1667 Oct 5 17:36 write_err.sh
-rw-r--r-- 1 root root 23040 Oct 8 04:44 write_err.txt
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Waiting...
Sleep ended: ret code = 0
/src /src
Awesome. One small ask, could you help to tag another release, please? :)
C++11 started to deprecate the use of throw function identifiers. In C++17, this header no longer compiles due to the deprecation. Further, cleaned up other gcc compiler warnings around the use of throw.
Errors due to
throw
Other gcc errors discovered after fixing the
throw
identifiersTesting
Environment
Signed-off-by: Ben Dang me@bdang.it