nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
34 stars 19 forks source link

std::binary_function is deprecated in C++11 and removed in C++17 #1578

Closed hchen99 closed 10 months ago

hchen99 commented 11 months ago

Following code in Event.hh would cause "error: no template named 'binary_function' in namespace 'std'" if using c++17 and above without failing the compilation though:

#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();
    }
};
#endif
sharmeye commented 10 months ago

This canary is very very sick