Remove deprecated constructs std::unary_function and std::binary_function

Issue #144 resolved
Paul Wilson created an issue

As of C++11 the std::unary_function and std::binary_function constructs were deprecated. As of C++17, they have been removed.

They only occur in moab/Interface.hpp to define type_equals and type_not_equals.

There are tips on the web for circumventing this, e.g. here

This will prevent compilation in C++17 and newer standards.

(replaces #143 with attribution)

Comments (2)

  1. Baptiste MOUGINOT (BaM)

    Here are the one I flagged, I’ll issue a PR about this tomorrow

    D:\a\DAGMC\moab_install\include\moab/Interface.hpp(1874,33): error C2039: 'unary_function': is not a member of 'std' [D:\a\DAGMC\build\src\pyne\pyne_dagmc-static.vcxproj]
    355
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\include\functional(31): message : see declaration of 'std' [D:\a\DAGMC\build\src\pyne\pyne_dagmc-static.vcxproj]
    356
    D:\a\DAGMC\moab_install\include\moab/Interface.hpp(1874,47): error C2504: 'unary_function': base class undefined [D:\a\DAGMC\build\src\pyne\pyne_dagmc-static.vcxproj]
    357
    D:\a\DAGMC\moab_install\include\moab/Interface.hpp(1874,47): error C2143: syntax error: missing ',' before '<' [D:\a\DAGMC\build\src\pyne\pyne_dagmc-static.vcxproj]
    358
    D:\a\DAGMC\moab_install\include\moab/Interface.hpp(1897,37): error C2039: 'unary_function': is not a member of 'std' [D:\a\DAGMC\build\src\pyne\pyne_dagmc-static.vcxproj]
    359
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\include\functional(31): message : see declaration of 'std' [D:\a\DAGMC\build\src\pyne\pyne_dagmc-static.vcxproj]
    360
    D:\a\DAGMC\moab_install\include\moab/Interface.hpp(1897,51): error C2504: 'unary_function': base class undefined [D:\a\DAGMC\build\src\pyne\pyne_dagmc-static.vcxproj]
    361
    D:\a\DAGMC\moab_install\include\moab/Interface.hpp(1897,51): error C2143: syntax error: missing ',' before '<' [D:\a\DAGMC\build\src\pyne\pyne_dagmc-static.vcxproj]
    

  2. Log in to comment