JayBeams
0.1
Another project to have fun coding.
|
#include <stdexcept>
#include <string>
Go to the source code of this file.
Classes | |
struct | jb::stn_traits< T > |
Traits to convert strings to numbers (e.g. More... | |
Namespaces | |
jb | |
The top-level namespace for the JayBeams library. | |
Macros | |
#define | STN_TRAITS(T, F) |
Functions | |
jb::STN_TRAITS (int, std::stoi) | |
jb::STN_TRAITS (unsigned long long, std::stoull) | |
jb::STN_TRAITS (long long, std::stoll) | |
jb::STN_TRAITS (unsigned long, std::stoul) | |
jb::STN_TRAITS (long, std::stol) | |
jb::STN_TRAITS (float, std::stof) | |
jb::STN_TRAITS (double, std::stod) | |
template<typename T > | |
bool | jb::strtonum (std::string const &s, T &r) |
Generic string to number conversion with validation. More... | |
struct jb::stn_traits |
Traits to convert strings to numbers (e.g.
integers, floats, etc).
For most types this refactors repetitive code, but also allows specialization for specific types.
Definition at line 16 of file strtonum.hpp.
#define STN_TRAITS | ( | T, | |
F | |||
) |
Definition at line 18 of file strtonum.hpp.