mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Changed not to inherit from binary_function for c++11 or above. (#1607)
This commit is contained in:
parent
2c27b65e14
commit
260b5fa558
@ -4,6 +4,7 @@
|
||||
PURPOSE: ( Event Class )
|
||||
*/
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "trick/mm_macros.hh"
|
||||
#include "trick/exec_proto.h"
|
||||
|
||||
@ -203,12 +204,16 @@ class Event {
|
||||
|
||||
|
||||
#ifndef SWIG
|
||||
struct CompareEventPtrs : public std::binary_function<Trick::Event *, Trick::Event *, bool> {
|
||||
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<Trick::Event *, Trick::Event *, bool> {
|
||||
#endif
|
||||
bool operator()(const Trick::Event * lhs, const Trick::Event * rhs) const {
|
||||
return lhs->get_next_tics() < rhs->get_next_tics();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user