-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Deprecation warnings on g++ 7.1.0 at MacOS 10.12.4 #689
Comments
Appreciate that! Noticed that 7.1 is out and that I can probably get it in Debian unstable too. Would you know what the new and recommended form is? |
Sorry, no clue. C++11 reads like black magic incantations to me. :( |
Some somewhat dense stuff here at cppreference.com. |
Here's the associated paper: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3051.html From what I read, the tl;dr is: don't use exception specifications to dictate what type of exception can / should be thrown; just leave it out. It's only worth specifying when you want to indicate that a function will not throw an exception (as it enables certain optimizations). The simplest fix is to just delete that |
Thanks so much -- I can certainly fire up a Debian unstable Docker container and try that. |
I've just come across these warnings as well. However, while in C++11 and C++14 mode they're indeed warnings, in C++17 mode they're errors for me, making this quite a bit more pressing (since all you need to do to get these errors is to
According to this thread on gcc-dev there is no way to demote this error to a warning. |
We will take care of them. In the meantime, and as you're at it, could you confirm that commenting out / removing these two suppresses the issue? It should have no effect on code or behaviour. |
The change --- /usr/local/lib/R/3.4/site-library/Rcpp/include/Rcpp/module/Module_Property.h.bak 2017-05-06 14:13:01.000000000 +0200
+++ /usr/local/lib/R/3.4/site-library/Rcpp/include/Rcpp/module/Module_Property.h 2017-05-06 14:14:02.000000000 +0200
@@ -100,7 +100,7 @@
SEXP get(Class* object) {
return Rcpp::wrap( (object->*getter)() ) ;
}
- void set(Class* object, SEXP value) throw(std::range_error,Rcpp::not_compatible){
+ void set(Class* object, SEXP value) {
(object->*setter)(
Rcpp::as< typename Rcpp::traits::remove_const_and_reference< PROP >::type >( value )
) ;
@@ -158,7 +158,7 @@
SEXP get(Class* object) {
return Rcpp::wrap( (object->*getter)() ) ;
}
- void set(Class* object, SEXP value) throw(std::range_error,Rcpp::not_compatible){
+ void set(Class* object, SEXP value) {
setter( object,
Rcpp::as< typename Rcpp::traits::remove_const_and_reference< PROP >::type >( value )
) ; allows me to compile the file in C++17 mode, yes. Update: It might be worth mentioning that even with |
Not a big deal, everything working as intended, but you may want to look at these warnings when building code with Rcpp using g++ 7.1.0
The text was updated successfully, but these errors were encountered: