[Rcpp-commits] r407 - in pkg/src: . Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 19 15:06:34 CET 2010
Author: romain
Date: 2010-01-19 15:06:34 +0100 (Tue, 19 Jan 2010)
New Revision: 407
Modified:
pkg/src/Function.cpp
pkg/src/Promise.cpp
pkg/src/Rcpp/Environment.h
pkg/src/Rcpp/Evaluator.h
pkg/src/Rcpp/ExpressionVector.h
pkg/src/Rcpp/Function.h
pkg/src/Rcpp/Promise.h
pkg/src/Rcpp/RObject.h
Log:
sunCC seems to want exception destructors and what()'s to be virtual
Modified: pkg/src/Function.cpp
===================================================================
--- pkg/src/Function.cpp 2010-01-19 13:53:43 UTC (rev 406)
+++ pkg/src/Function.cpp 2010-01-19 14:06:34 UTC (rev 407)
@@ -28,7 +28,7 @@
namespace Rcpp {
- const char* Function::not_a_closure::what() throw(){
+ const char* Function::not_a_closure::what() const throw(){
return "not a closure" ;
}
Modified: pkg/src/Promise.cpp
===================================================================
--- pkg/src/Promise.cpp 2010-01-19 13:53:43 UTC (rev 406)
+++ pkg/src/Promise.cpp 2010-01-19 14:06:34 UTC (rev 407)
@@ -27,7 +27,7 @@
namespace Rcpp {
- const char* Promise::unevaluated_promise::what() throw() {
+ const char* Promise::unevaluated_promise::what() const throw() {
return "promise not yet evaluated" ;
}
Modified: pkg/src/Rcpp/Environment.h
===================================================================
--- pkg/src/Rcpp/Environment.h 2010-01-19 13:53:43 UTC (rev 406)
+++ pkg/src/Rcpp/Environment.h 2010-01-19 14:06:34 UTC (rev 407)
@@ -41,13 +41,13 @@
*/
no_such_binding( const std::string& binding) ;
+ virtual ~no_such_binding() throw() ;
+
/**
* The message: no such binding : '{binding}'
*/
- const char* what() const throw();
+ virtual const char* what() const throw();
- ~no_such_binding() throw() ;
-
private:
std::string message ;
} ;
@@ -62,13 +62,13 @@
* @param binding name of the binding
*/
binding_is_locked( const std::string& binding) ;
-
+ virtual ~binding_is_locked() throw() ;
+
/**
* The message: binding is locked : '{binding}'
*/
- const char* what() const throw() ;
-
- ~binding_is_locked() throw() ;
+ virtual const char* what() const throw() ;
+
private:
std::string message ;
} ;
@@ -84,12 +84,14 @@
*/
no_such_namespace( const std::string& package) ;
+ virtual ~no_such_namespace() throw() ;
+
/**
* The message: no such namespace : '{package}'
*/
- const char* what() const throw() ;
+ virtual const char* what() const throw() ;
- ~no_such_namespace() throw() ;
+
private:
std::string message ;
} ;
@@ -109,13 +111,14 @@
* @paral pos search path position where there is no environment
*/
no_such_env(int pos) ;
+ virtual ~no_such_env() throw() ;
/**
* The message: no such environment : '{name}'
*/
- const char* what() const throw() ;
+ virtual const char* what() const throw() ;
- ~no_such_env() throw() ;
+
private:
std::string message ;
} ;
Modified: pkg/src/Rcpp/Evaluator.h
===================================================================
--- pkg/src/Rcpp/Evaluator.h 2010-01-19 13:53:43 UTC (rev 406)
+++ pkg/src/Rcpp/Evaluator.h 2010-01-19 14:06:34 UTC (rev 407)
@@ -34,8 +34,8 @@
class eval_error : public std::exception{
public:
eval_error( const std::string& message ) throw() ;
- ~eval_error() throw() ;
- const char* what() const throw() ;
+ virtual ~eval_error() throw() ;
+ virtual const char* what() const throw() ;
private:
std::string message ;
} ;
Modified: pkg/src/Rcpp/ExpressionVector.h
===================================================================
--- pkg/src/Rcpp/ExpressionVector.h 2010-01-19 13:53:43 UTC (rev 406)
+++ pkg/src/Rcpp/ExpressionVector.h 2010-01-19 14:06:34 UTC (rev 407)
@@ -40,8 +40,8 @@
class parse_error : public std::exception{
public:
parse_error() throw();
- ~parse_error() throw();
- const char* const what() throw() ;
+ virtual ~parse_error() throw();
+ virtual const char* const what() throw() ;
} ;
/* much inspired from item 30 of more effective C++ */
Modified: pkg/src/Rcpp/Function.h
===================================================================
--- pkg/src/Rcpp/Function.h 2010-01-19 13:53:43 UTC (rev 406)
+++ pkg/src/Rcpp/Function.h 2010-01-19 14:06:34 UTC (rev 407)
@@ -42,8 +42,8 @@
class not_a_closure : public std::exception{
public:
not_a_closure() throw() {} ;
- ~not_a_closure() throw() {} ;
- const char* what() throw() ;
+ virtual ~not_a_closure() throw() {} ;
+ virtual const char* what() const throw() ;
} ;
/**
Modified: pkg/src/Rcpp/Promise.h
===================================================================
--- pkg/src/Rcpp/Promise.h 2010-01-19 13:53:43 UTC (rev 406)
+++ pkg/src/Rcpp/Promise.h 2010-01-19 14:06:34 UTC (rev 407)
@@ -36,8 +36,8 @@
class unevaluated_promise : public std::exception{
public:
unevaluated_promise() throw(){};
- ~unevaluated_promise() throw(){} ;
- const char* what() throw() ;
+ virtual ~unevaluated_promise() throw(){} ;
+ virtual const char* what() const throw() ;
} ;
Promise( SEXP x) throw(not_compatible) ;
Modified: pkg/src/Rcpp/RObject.h
===================================================================
--- pkg/src/Rcpp/RObject.h 2010-01-19 13:53:43 UTC (rev 406)
+++ pkg/src/Rcpp/RObject.h 2010-01-19 14:06:34 UTC (rev 407)
@@ -36,8 +36,8 @@
class not_compatible: public std::exception{
public:
not_compatible(const std::string& message) throw() : message(message){};
- ~not_compatible() throw(){} ;
- const char* what() const throw() ;
+ virtual ~not_compatible() throw(){} ;
+ virtual const char* what() const throw() ;
private:
std::string message ;
} ;
@@ -48,15 +48,15 @@
class not_s4: public std::exception{
public:
not_s4() throw(){};
- ~not_s4() throw(){} ;
- const char* what() const throw() ;
+ virtual ~not_s4() throw(){} ;
+ virtual const char* what() const throw() ;
} ;
class index_out_of_bounds: public std::exception{
public:
index_out_of_bounds() throw(){};
- ~index_out_of_bounds() throw(){};
- const char* what() const throw() ;
+ virtual ~index_out_of_bounds() throw(){};
+ virtual const char* what() const throw() ;
} ;
/**
More information about the Rcpp-commits
mailing list