diff options
Diffstat (limited to 'include/ocl/basic_hash.hpp')
| -rw-r--r-- | include/ocl/basic_hash.hpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/ocl/basic_hash.hpp b/include/ocl/basic_hash.hpp new file mode 100644 index 0000000..6a39df2 --- /dev/null +++ b/include/ocl/basic_hash.hpp @@ -0,0 +1,23 @@ +#ifndef __OCL_CORE_BASIC_HASH +#define __OCL_CORE_BASIC_HASH + +#include <ocl/detail/config.hpp> + +/// @brief OCL equivalence namespace. +namespace ocl +{ + template <class T> + struct basic_hash final + { + using result_type = typename T::result_type; + using type = T; + + // AMLALE: If it throws, we can't compute the hash correctly. + constexpr result_type hash() noexcept + { + return type{}.hash(); + } + }; +} + +#endif
\ No newline at end of file |
