diff --git a/include/trick/Event.hh b/include/trick/Event.hh index b81f021e..d54dd0fb 100644 --- a/include/trick/Event.hh +++ b/include/trick/Event.hh @@ -4,6 +4,7 @@ PURPOSE: ( Event Class ) */ #include +#include #include "trick/mm_macros.hh" #include "trick/exec_proto.h" @@ -203,12 +204,16 @@ class Event { #ifndef SWIG -struct CompareEventPtrs : public std::binary_function { - bool operator()(const Trick::Event * lhs, const Trick::Event * rhs) const { - return lhs->get_next_tics() < rhs->get_next_tics(); - } -}; - + // No need to inherit from binary_function for c++11 or later + #if __cplusplus >= 201103L + struct CompareEventPtrs { + #else + struct CompareEventPtrs : public std::binary_function { + #endif + bool operator()(const Trick::Event * lhs, const Trick::Event * rhs) const { + return lhs->get_next_tics() < rhs->get_next_tics(); + } + }; #endif }