Sha256: e9377eb690dfd146bc854823acfa1fcbde2eb2851ee6e72aa17e2e333a936b5d

Contents?: true

Size: 1.26 KB

Versions: 38

Compression:

Stored size: 1.26 KB

Contents

//  boost/chrono/utility/to_string.hpp
//
//  Copyright 2011 Vicente J. Botet Escriba
//  Use, modification and distribution are subject to the Boost Software License,
//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt).

#ifndef BOOST_CHRONO_UTILITY_TO_STRING_HPP
#define BOOST_CHRONO_UTILITY_TO_STRING_HPP

#include <boost/chrono/config.hpp>
#include <string>
#include <sstream>

namespace boost
{
  namespace chrono
  {
    template <typename CharT, typename T>
    std::basic_string<CharT> to_basic_string(T const&v) {
      std::basic_stringstream<CharT> sstr;
      sstr << v;
      return sstr.str();
    }

    template <typename T>
    std::string to_string(T const&v) {
      return to_basic_string<char>(v);
    }
#ifndef BOOST_NO_STD_WSTRING
    template <typename T>
    std::wstring to_wstring(T const&v) {
      return to_basic_string<wchar_t>(v);
    }
#endif
#if BOOST_CHRONO_HAS_UNICODE_SUPPORT
    template <typename T>
    std::basic_string<char16_t> to_u16string(T const&v) {
      return to_basic_string<char16_t>(v);
    }
    template <typename T>
    std::basic_string<char32_t> to_u32string(T const&v) {
      return to_basic_string<char32_t>(v);
    }
#endif
  } // chrono

} // boost

#endif  // header

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
passenger-6.0.26 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.25 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.24 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.23 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.20 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.7 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.6 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp
passenger-6.0.5 src/cxx_supportlib/vendor-modified/boost/chrono/io/utility/to_string.hpp