Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarLexicalCast.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/StarLexicalCast.hpp')
-rw-r--r--source/core/StarLexicalCast.hpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/core/StarLexicalCast.hpp b/source/core/StarLexicalCast.hpp
index 2831f95..6359591 100644
--- a/source/core/StarLexicalCast.hpp
+++ b/source/core/StarLexicalCast.hpp
@@ -1,6 +1,7 @@
#ifndef STAR_LEXICAL_CAST_HPP
#define STAR_LEXICAL_CAST_HPP
+#include "StarFormat.hpp"
#include "StarString.hpp"
#include "StarStringView.hpp"
#include "StarMaybe.hpp"
@@ -42,12 +43,8 @@ Type lexicalCast(StringView s, std::ios_base::fmtflags flags = std::ios_base::bo
}
template <class Type>
-std::string toString(Type const& t, std::ios_base::fmtflags flags = std::ios_base::boolalpha) {
- std::stringstream ss;
- ss.flags(flags);
- ss.imbue(std::locale::classic());
- ss << t;
- return ss.str();
+std::string toString(Type const& t) {
+ return fmt::to_string(t);
}
}