Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed deprecated dynamic exception specifications #1137

Merged
merged 1 commit into from
Aug 14, 2017

Conversation

racko
Copy link
Contributor

@racko racko commented Aug 12, 2017

.../ros_comm/tools/rosbag_storage/include/rosbag/bag_player.h:80:42: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
   BagPlayer(const std::string &filename) throw(BagException);
                                          ^~~~~
.../ros_comm/tools/rosbag_storage/src/bag_player.cpp:8:48: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
 BagPlayer::BagPlayer(const std::string &fname) throw(BagException) {
                                                ^~~~~

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3051.html says it all:

Exception specifications have proven close to worthless in practice, while adding a measurable overhead to programs. The feature should be deprecated. The one exception to the rule is the empty throw specification which could serve a legitimate optimizing role if the requirement to call the runtime unexpected mechanism was relaxed in this case.

@dirk-thomas
Copy link
Member

Please provide a description with your PR to clarify why this patch is desired. The exception specification has some value.

@racko
Copy link
Contributor Author

racko commented Aug 14, 2017

Updated

I'm not sure if you get notified automatically :)

@dirk-thomas
Copy link
Member

I'm not sure if you get notified automatically :)

GitHub only sends emails for new comments and new commits. Edited comments and amended commits don't generate a notification. So this comment was good to notify me 👍

I agree that it makes sense to remove the exception specification. I also removed it from rostime: ros/roscpp_core#64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants