]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/icl/include/boost/icl/type_traits/identity_element.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / icl / include / boost / icl / type_traits / identity_element.hpp
CommitLineData
7c673cae
FG
1/*-----------------------------------------------------------------------------+
2Copyright (c) 2008-2009: Joachim Faulhaber
3+------------------------------------------------------------------------------+
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENCE.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt)
7+-----------------------------------------------------------------------------*/
8#ifndef BOOST_ICL_TYPE_TRAITS_IDENTITY_ELEMENT_HPP_JOFA_080912
9#define BOOST_ICL_TYPE_TRAITS_IDENTITY_ELEMENT_HPP_JOFA_080912
10
11#include <boost/icl/type_traits/type_to_string.hpp>
12
13namespace boost{ namespace icl
14{
15 template <class Type> struct identity_element
16 {
17 static Type value();
18 Type operator()()const { return value(); }
19 };
20
21 template <class Type>
22 inline Type identity_element<Type>::value()
23 {
24 static Type _value;
25 return _value;
26 }
27
28 template<>
29 inline std::string unary_template_to_string<identity_element>::apply() { return "0"; }
30
31}} // namespace boost icl
32
33#endif
34
35