#ifndef UTIL_LEXICAL_CAST_2020_01_28_H #define UTIL_LEXICAL_CAST_2020_01_28_H #include #include #if(__cplusplus >= 201703L) namespace al::crypto::util { #else namespace al { namespace crypto { namespace util { #endif template auto my_lexical_cast(const integral_type& n) -> std::string { std::stringstream ss; ss << n; return ss.str(); } template auto my_lexical_cast(const std::string& str) -> integral_type { std::stringstream ss(str); integral_type t; ss >> t; return t; } #if(__cplusplus >= 201703L) } // namespace al::crypto::util #else } // namespace util } // namespace crypto } // namespace al #endif #endif // UTIL_LEXICAL_CAST_2020_01_28_H