Support Class Library
A set of tools providing classes and utility
Hash.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <scl/macros.h>
8 
9 namespace scl{
10  namespace concepts{
17  template <class T, class Key>
18  struct Hash{
19  constexpr operator bool() const{
20  return FunctionObject<T, Key>{}
22  && Destructible<T>{}
23  && META::is_same<
24  decltype(std::declval<T>()(std::declval<Key>())), //call of T(Key)
25  std::size_t
26  >();
27  }
28  };
29  }
30 }
Global namespace of the SCL.
Definition: alias.hpp:3
Destructible concept, a type T is destructible if it defines a destructor that won&#39;t throw...
Definition: Destructible.h:12
constexpr bool is_same()
An handy function for the result of std::is_same.
Definition: is_same.h:12
Hash concept, a type T is an hash for Key if it is a function object, copy constructible, destructible, and the return type of its invocation w/ a Key is std::size_t.
Definition: Hash.h:18
CopyConstructible concept, a type T is copy constructible if meta::is_copy_constructible<T>() is true...
FunctionObject concept, a type F is a function object that accepts Args...