Skip to content
Snippets Groups Projects
Commit 36eeb20a authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Merge branch 'const-reference-stringToNum' into 'master'

Change reference to const reference in stringToNum

See merge request !462
parents e48f00a3 386d5c3e
Branches
No related merge requests found
......@@ -25,15 +25,15 @@
namespace walberla {
template<typename S>
inline S stringToNum( std::string & t );
template <> inline float stringToNum( std::string & t ) { return std::stof(t); }
template <> inline double stringToNum( std::string & t ) { return std::stod(t); }
template <> inline long double stringToNum( std::string & t ) { return std::stold(t); }
template <> inline int stringToNum( std::string & t ) { return std::stoi(t); }
template <> inline long stringToNum( std::string & t ) { return std::stol(t); }
template <> inline long long stringToNum( std::string & t ) { return std::stoll(t); }
template <> inline unsigned long stringToNum( std::string & t ) { return std::stoul(t); }
template <> inline unsigned long long stringToNum( std::string & t ) { return std::stoull(t); }
inline S stringToNum( const std::string & t );
template <> inline float stringToNum( const std::string & t ) { return std::stof(t); }
template <> inline double stringToNum( const std::string & t ) { return std::stod(t); }
template <> inline long double stringToNum( const std::string & t ) { return std::stold(t); }
template <> inline int stringToNum( const std::string & t ) { return std::stoi(t); }
template <> inline long stringToNum( const std::string & t ) { return std::stol(t); }
template <> inline long long stringToNum( const std::string & t ) { return std::stoll(t); }
template <> inline unsigned long stringToNum( const std::string & t ) { return std::stoul(t); }
template <> inline unsigned long long stringToNum( const std::string & t ) { return std::stoull(t); }
} // namespace walberla
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment