From: Mikko Rasa Date: Sun, 1 Jan 2023 20:20:39 +0000 (+0200) Subject: Make lexical conversions from and to long long available everywhere X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=672dd8d4178716824bf21a76685d91fc82a0a4af;p=libs%2Fcore.git Make lexical conversions from and to long long available everywhere The type became part of the C++ standard in C++11, so there's no longer need to guard it with __GNUC__. --- diff --git a/source/strings/lexicalcast.cpp b/source/strings/lexicalcast.cpp index 2b84d9b..5e9159c 100644 --- a/source/strings/lexicalcast.cpp +++ b/source/strings/lexicalcast.cpp @@ -530,13 +530,11 @@ void operator<<(LexicalConverter &c, unsigned v) void operator<<(LexicalConverter &c, unsigned long v) { c.result(int_to_str(v, c.get_fmt())); } -#ifdef __GNUC__ void operator<<(LexicalConverter &c, long long v) { c.result(int_to_str(v, c.get_fmt())); } void operator<<(LexicalConverter &c, unsigned long long v) { c.result(int_to_str(v, c.get_fmt())); } -#endif void operator<<(LexicalConverter &c, bool v) { c.result(bool_to_str(v, c.get_fmt())); } @@ -601,13 +599,11 @@ void operator>>(const LexicalConverter &c, unsigned int &v) void operator>>(const LexicalConverter &c, unsigned long &v) { v = str_to_int(c.get(), c.get_fmt()); } -#ifdef __GNUC__ void operator>>(const LexicalConverter &c, long long &v) { v = str_to_int(c.get(), c.get_fmt()); } void operator>>(const LexicalConverter &c, unsigned long long &v) { v = str_to_int(c.get(), c.get_fmt()); } -#endif void operator>>(const LexicalConverter &c, bool &v) { v = str_to_bool(c.get()); } diff --git a/source/strings/lexicalcast.h b/source/strings/lexicalcast.h index 9aecd32..12b5d08 100644 --- a/source/strings/lexicalcast.h +++ b/source/strings/lexicalcast.h @@ -58,10 +58,8 @@ void operator<<(LexicalConverter &, unsigned char); void operator<<(LexicalConverter &, unsigned short); void operator<<(LexicalConverter &, unsigned); void operator<<(LexicalConverter &, unsigned long); -#ifdef __GNUC__ void operator<<(LexicalConverter &, long long); void operator<<(LexicalConverter &, unsigned long long); -#endif void operator<<(LexicalConverter &, bool); void operator<<(LexicalConverter &, float); void operator<<(LexicalConverter &, double); @@ -79,10 +77,8 @@ void operator>>(const LexicalConverter &, unsigned char &); void operator>>(const LexicalConverter &, unsigned short &); void operator>>(const LexicalConverter &, unsigned int &); void operator>>(const LexicalConverter &, unsigned long &); -#ifdef __GNUC__ void operator>>(const LexicalConverter &, long long &); void operator>>(const LexicalConverter &, unsigned long long &); -#endif void operator>>(const LexicalConverter &, bool &); void operator>>(const LexicalConverter &, float &); void operator>>(const LexicalConverter &, double &);