mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-19 01:26:56 +08:00
25 lines
346 B
C++
25 lines
346 B
C++
#pragma once
|
|
|
|
#include "../../include/cpdoccore/CPOptional.h"
|
|
|
|
namespace boost
|
|
{
|
|
template< class T > struct hash;
|
|
}
|
|
|
|
namespace cpdoccore {
|
|
|
|
template <class T>
|
|
std::size_t hash_value(typename optional<T>::Type const & val)
|
|
{
|
|
if (val)
|
|
{
|
|
boost::hash<T>(*val);
|
|
}
|
|
else
|
|
return 0;
|
|
}
|
|
|
|
}
|
|
|