Flow123d  JS_before_hm-1804-gf2ad740aa
string.h
Go to the documentation of this file.
1 /*
2  Formatting library for C++ - string utilities
3 
4  Copyright (c) 2012 - 2016, Victor Zverovich
5  All rights reserved.
6 
7  For the license information refer to format.h.
8  */
9 
10 #ifndef FMT_STRING_H_
11 #define FMT_STRING_H_
12 
13 #include "system/fmt/format.h"
14 
15 namespace fmt {
16 
17 /**
18  \rst
19  Converts *value* to ``std::string`` using the default format for type *T*.
20 
21  **Example**::
22 
23  #include "fmt/string.h"
24 
25  std::string answer = fmt::to_string(42);
26  \endrst
27  */
28 template <typename T>
29 std::string to_string(const T &value) {
31  w << value;
32  return w.str();
33 }
34 }
35 
36 #endif // FMT_STRING_H_
fmt::BasicMemoryWriter
Definition: format.h:2985
fmt::to_string
std::string to_string(const T &value)
Definition: string.h:29
format.h
value
static constexpr bool value
Definition: json.hpp:87
fmt::BasicWriter::str
std::basic_string< Char > str() const
Definition: format.h:2451
fmt
Definition: format.cc:82