]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/icl/include/boost/icl/type_traits/to_string.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / icl / include / boost / icl / type_traits / to_string.hpp
CommitLineData
7c673cae
FG
1/*-----------------------------------------------------------------------------+
2Copyright (c) 2007-2009: Joachim Faulhaber
3+------------------------------------------------------------------------------+
4Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin
5+------------------------------------------------------------------------------+
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENCE.txt or copy at
8 http://www.boost.org/LICENSE_1_0.txt)
9+-----------------------------------------------------------------------------*/
10
11/*-----------------------------------------------------------------------------
12Function-templates for discrete Datatypes like int, unsigned or
13 any class that provides a ++ operator c.f. iterators
14-----------------------------------------------------------------------------*/
15
16#ifndef BOOST_ICL_TO_STRING_HPP_JOFA_000712
17#define BOOST_ICL_TO_STRING_HPP_JOFA_000712
18
19#include <stdio.h>
20#include <string>
21#include <sstream>
22
23namespace boost{ namespace icl
24{
25
26/// Static class template for the string representation of values
27template <class Type>
28struct to_string
29{
30 /** Converts all values of types to std::string that implement an operator << */
31 static std::string apply(const Type& value)
32 {
33 std::stringstream repr;
34 repr << value;
35 return repr.str();
36 }
37};
38
39}} // namespace boost icl
40
41#endif
42
43