Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/date_time/string_convert.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 #ifndef _STRING_CONVERT_HPP___ |
Chris@16 | 2 #define _STRING_CONVERT_HPP___ |
Chris@16 | 3 |
Chris@16 | 4 /* Copyright (c) 2005 CrystalClear Software, Inc. |
Chris@16 | 5 * Subject to the Boost Software License, Version 1.0. (See accompanying |
Chris@16 | 6 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 7 * Author: Jeff Garland, Bart Garst |
Chris@101 | 8 * $Date$ |
Chris@16 | 9 */ |
Chris@16 | 10 |
Chris@16 | 11 #include "boost/date_time/compiler_config.hpp" |
Chris@16 | 12 #include <string> |
Chris@16 | 13 |
Chris@16 | 14 namespace boost { |
Chris@16 | 15 namespace date_time { |
Chris@16 | 16 |
Chris@16 | 17 //! Converts a string from one value_type to another |
Chris@16 | 18 /*! Converts a wstring to a string (or a string to wstring). If both template parameters |
Chris@16 | 19 * are of same type, a copy of the input string is returned. */ |
Chris@16 | 20 template<class InputT, class OutputT> |
Chris@16 | 21 inline |
Chris@16 | 22 std::basic_string<OutputT> convert_string_type(const std::basic_string<InputT>& inp_str) |
Chris@16 | 23 { |
Chris@16 | 24 typedef std::basic_string<OutputT> output_type; |
Chris@16 | 25 output_type result; |
Chris@16 | 26 result.insert(result.begin(), inp_str.begin(), inp_str.end()); |
Chris@16 | 27 return result; |
Chris@16 | 28 } |
Chris@16 | 29 |
Chris@16 | 30 }} // namespace boost::date_time |
Chris@16 | 31 |
Chris@16 | 32 #endif // _STRING_CONVERT_HPP___ |