5 #ifndef __eigenpy_deprecation_hpp__
6 #define __eigenpy_deprecation_hpp__
19 return PyExc_DeprecationWarning;
21 return PyExc_FutureWarning;
24 throw std::invalid_argument(
25 "Undefined DeprecationType - this should never be triggered.");
34 class BasePolicy = bp::default_call_policies>
40 : BasePolicy(),
m_what(warning_msg) {}
45 return static_cast<const BasePolicy *
>(
this);
48 template <
class ArgPackage>
49 bool precall(
const ArgPackage &args)
const {
52 return derived()->precall(args);
60 class BasePolicy = bp::default_call_policies>
64 "This function has been marked as deprecated, and "
65 "will be removed in the future.")
70 class BasePolicy = bp::default_call_policies>
74 "This attribute or method has been marked as "
75 "deprecated, and will be removed in the future.")
81 #endif // ifndef __eigenpy_deprecation_hpp__