Remove inheritance from std::unary_function and std::binary_function,

they are deprecated in C++11 and already removed in Visual C++ '15'
running with /std:c++latest

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3145.html
This commit is contained in:
Anthony Heading 2016-12-29 00:56:46 -05:00
commit 1871acd4bc
4 changed files with 9 additions and 9 deletions

View file

@ -38,7 +38,7 @@
namespace swig {
template < class T >
struct yield : public std::unary_function< T, bool >
struct yield
{
bool
operator()( const T& v ) const

View file

@ -90,7 +90,7 @@ namespace swig {
static ID call_id = rb_intern("call");
template <class _T = GC_VALUE, class _DefaultFunc = std::less<GC_VALUE> >
struct BinaryPredicate : GC_VALUE, std::binary_function< _T, _T, bool >
struct BinaryPredicate : GC_VALUE
{
BinaryPredicate(VALUE obj = Qnil) : GC_VALUE(obj) { }
bool operator()(_T a, _T b) const
@ -109,7 +109,7 @@ namespace swig {
};
template <class _T = GC_VALUE, class _DefaultFunc = std::less< _T > >
struct BinaryFunction : GC_VALUE, std::binary_function< _T, _T, _T >
struct BinaryFunction : GC_VALUE
{
BinaryFunction(VALUE obj = Qnil) : GC_VALUE(obj) { }
_T operator()(_T a, _T b) const
@ -128,7 +128,7 @@ namespace swig {
};
template< class _T = GC_VALUE >
struct UnaryPredicate : GC_VALUE, std::unary_function< _T, bool >
struct UnaryPredicate : GC_VALUE
{
UnaryPredicate(VALUE obj = Qnil) : GC_VALUE(obj) { }
bool operator()(_T a) const
@ -142,7 +142,7 @@ namespace swig {
};
template< class _T = GC_VALUE >
struct UnaryFunction : GC_VALUE, std::unary_function< _T, _T >
struct UnaryFunction : GC_VALUE
{
UnaryFunction(VALUE obj = Qnil) : GC_VALUE(obj) { }
_T operator()(_T a) const