|
gz-cpp-util 1.3
A c++20 library containing various utilities
|
Contains functions to construct types from string. More...
Go to the source code of this file.
Concepts | |
| concept | gz::util::GetTypeFromStringImplemented |
| toString is implemented for these types | |
| concept | gz::ConstructibleFromString |
| Any type where fromString(string) exists and returns T. | |
Functions | |
| template<gz::util::False T> | |
| T | fromString (const std::string &s) |
| Declaration of fromString in global namespace, so that concepts can use it. More... | |
Construct a type from a string | |
| |
| template<util::GetTypeFromStringImplemented T> | |
| T | gz::fromString (const std::string &s) |
| Declaration of fromString, but only for the types for which it is implemented. More... | |
| template<> | |
| int | gz::fromString< int > (const std::string &s) |
| template<> | |
| long | gz::fromString< long > (const std::string &s) |
| template<> | |
| long long | gz::fromString< long long > (const std::string &s) |
| template<> | |
| unsigned int | gz::fromString< unsigned int > (const std::string &s) |
| template<> | |
| unsigned long | gz::fromString< unsigned long > (const std::string &s) |
| template<> | |
| unsigned long long | gz::fromString< unsigned long long > (const std::string &s) |
| template<> | |
| float | gz::fromString< float > (const std::string &s) |
| template<> | |
| double | gz::fromString< double > (const std::string &s) |
| template<> | |
| long double | gz::fromString< long double > (const std::string &s) |
| template<> | |
| bool | gz::fromString< bool > (const std::string &s) |
| Convert a string to bool. More... | |
Contains functions to construct types from string.
| T fromString | ( | const std::string & | s | ) |
Declaration of fromString in global namespace, so that concepts can use it.
This declaration only exists so that fromString can be used in concepts.
|
inline |
Declaration of fromString, but only for the types for which it is implemented.
Construct T from a string using a fromString that is declared in global namespace.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| bool gz::fromString< bool > | ( | const std::string & | s | ) |
Convert a string to bool.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |