7 #ifndef INCLUDE_MOLASSEMBLER_TEMPLE_STRONG_INDEX_H 
    8 #define INCLUDE_MOLASSEMBLER_TEMPLE_STRONG_INDEX_H 
   11 #include "boost/functional/hash.hpp" 
   15 namespace Molassembler {
 
   36 template<
typename Tag, 
typename T>
 
   40   using Hash = boost::hash<StrongIndex<Tag, T>>;
 
   52   constexpr 
StrongIndex& operator = (const T& v) { v_ = v; 
return *
this; }
 
   55   constexpr 
operator T& () noexcept { 
return v_; }
 
   56   constexpr 
operator const T& () 
const noexcept { 
return v_; }
 
   58   constexpr 
auto tie()
 const { 
return std::tie(v_); }
 
   75 template<
typename Tag, 
typename T>
 
   77   return boost::hash<T>{}(v);
 
Generates all operators using a method returning a tuple. 
Definition: OperatorSuppliers.h:78
Type helper for creating strong index types that are type-level distinct from their fundamental types...
Definition: StrongIndex.h:37
Operator-supplying CRTP base classes. 
constexpr StrongIndex()=default
Default constructor does not value initialize. 
constexpr StrongIndex(T v)
Explicit value initialization. 
Definition: StrongIndex.h:45
std::size_t hash_value(const StrongIndex< Tag, T > &v)
Hash support function for strong index types. 
Definition: StrongIndex.h:76