New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
string_convert.hpp in vendors/XIOS/current/extern/boost/include/boost/date_time – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/date_time/string_convert.hpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

File size: 1.1 KB
Line 
1#ifndef _STRING_CONVERT_HPP___
2#define _STRING_CONVERT_HPP___
3
4/* Copyright (c) 2005 CrystalClear Software, Inc.
5 * Subject to the Boost Software License, Version 1.0. (See accompanying
6 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7 * Author: Jeff Garland, Bart Garst
8 * $Date: 2008-02-27 15:00:24 -0500 (Wed, 27 Feb 2008) $
9 */
10
11#include "boost/date_time/compiler_config.hpp"
12#include <string>
13
14namespace boost {
15namespace date_time {
16
17  //! Converts a string from one value_type to another
18  /*! Converts a wstring to a string (or a string to wstring). If both template parameters
19   * are of same type, a copy of the input string is returned. */
20  template<class InputT, class OutputT>
21  inline
22  std::basic_string<OutputT> convert_string_type(const std::basic_string<InputT>& inp_str)
23  {
24    typedef std::basic_string<InputT> input_type;
25    typedef std::basic_string<OutputT> output_type;
26    output_type result;
27    result.insert(result.begin(), inp_str.begin(), inp_str.end());
28    return result;
29  }
30 
31}} // namespace boost::date_time
32
33#endif // _STRING_CONVERT_HPP___
Note: See TracBrowser for help on using the repository browser.