Replace throw with noexcept for C17 compatibility#17
Merged
arun11299 merged 1 commit intoarun11299:masterfrom Oct 8, 2018
Merged
Replace throw with noexcept for C17 compatibility#17arun11299 merged 1 commit intoarun11299:masterfrom
arun11299 merged 1 commit intoarun11299:masterfrom
Conversation
Contributor
Author
|
Furthermore, tested compiling with |
arun11299
reviewed
Oct 6, 2018
Owner
arun11299
left a comment
There was a problem hiding this comment.
Thanks for trying to make it compatible with latest standard. I have few comments/questions in the change set. Could you please clarify those?
C++11 started to deprecate the use of throw function identifiers. In C++17, this header no longer compiles due to the deprecation. Signed-off-by: Ben Dang <me@bdang.it>
Contributor
Author
|
Hi @arun11299, I updated the PR based on your comments. I have to admit that I didn't realize I compiled against 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 |
Contributor
Author
|
Awesome. One small ask, could you help to tag another release, please? :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
throwOther gcc errors discovered after fixing the
throwidentifiersTesting
Environment
Signed-off-by: Ben Dang me@bdang.it