mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 01:11:43 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@61982 954022d7-b5bf-4e40-9824-e11837661b57
29 lines
399 B
C++
29 lines
399 B
C++
#ifndef _CPDOCCORE_HASH_H_
|
|
#define _CPDOCCORE_HASH_H_
|
|
|
|
#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;
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|