diff --git a/src/base/occ_handle.h b/src/base/occ_handle.h index 1a4decbf..290bbc36 100644 --- a/src/base/occ_handle.h +++ b/src/base/occ_handle.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include // For std::forward() namespace Mayo { @@ -14,7 +15,7 @@ namespace Mayo { // Template alias for OpenCascade handle template using OccHandle = opencascade::handle; -// Constructs an object of 'T' wrapped in an OpenCascade handle +// Constructs an object of type 'T' wrapped in an OpenCascade handle // Note: Standard_Transient must be a base class of 'T' template OccHandle makeOccHandle(Args&&... args) @@ -23,3 +24,16 @@ OccHandle makeOccHandle(Args&&... args) } } // namespace Mayo + +#if OCC_VERSION_HEX < 0x070800 +namespace std { + +// Specialization of C++11 std::hash<> functor for opencascade::handle<> objects +template struct hash> { + inline std::size_t operator()(const opencascade::handle& hnd) const { + return hash{}(hnd.get()); + } +}; + +} // namespace std +#endif diff --git a/src/base/tkernel_utils.h b/src/base/tkernel_utils.h index 55678134..6be4fa04 100644 --- a/src/base/tkernel_utils.h +++ b/src/base/tkernel_utils.h @@ -9,7 +9,6 @@ #include "occ_handle.h" #include -#include #include #include #include @@ -21,7 +20,6 @@ #if OCC_VERSION_HEX >= OCC_VERSION_CHECK(7, 5, 0) # include #else -# include class Message_ProgressIndicator; #endif @@ -56,16 +54,3 @@ class TKernelUtils { }; } // namespace Mayo - -#if OCC_VERSION_HEX < OCC_VERSION_CHECK(7, 8, 0) -namespace std { - -// Specialization of C++11 std::hash<> functor for opencascade::handle<> objects -template struct hash> { - inline std::size_t operator()(const opencascade::handle& hnd) const { - return hash{}(hnd.get()); - } -}; - -} // namespace std -#endif diff --git a/src/io_assimp/io_assimp_reader.h b/src/io_assimp/io_assimp_reader.h index f443fb82..1d8f7ab0 100644 --- a/src/io_assimp/io_assimp_reader.h +++ b/src/io_assimp/io_assimp_reader.h @@ -7,7 +7,6 @@ #pragma once #include "../base/io_reader.h" -#include "../base/occ_handle.h" #include