diff options
| author | Markus Mittendrein <maxmitti@maxmitti.tk> | 2022-01-08 00:28:29 +0100 |
|---|---|---|
| committer | Markus Mittendrein <maxmitti@maxmitti.tk> | 2022-01-08 00:28:29 +0100 |
| commit | f2c30b4214a11c575e27b79928e82dda91bd03aa (patch) | |
| tree | 59aeea57ed9642d5b1d310c9a68ce75313efbe74 | |
| parent | 93fb22c69728beba9b3d1eecd16fc7a32d1da8d4 (diff) | |
| download | cxxformat-f2c30b4214a11c575e27b79928e82dda91bd03aa.tar.gz cxxformat-f2c30b4214a11c575e27b79928e82dda91bd03aa.zip | |
Add literals inline namespace
| -rw-r--r-- | include/cxxformat/core.hpp | 4 | ||||
| -rw-r--r-- | include/cxxformat/string.hpp | 4 | ||||
| -rw-r--r-- | main.cpp | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/include/cxxformat/core.hpp b/include/cxxformat/core.hpp index 048b3c9..9781970 100644 --- a/include/cxxformat/core.hpp +++ b/include/cxxformat/core.hpp @@ -578,5 +578,7 @@ namespace format { } } - using compile_time::operator ""_format_to; + inline namespace literals { + using compile_time::operator ""_format_to; + } } diff --git a/include/cxxformat/string.hpp b/include/cxxformat/string.hpp index 06cb620..a40c303 100644 --- a/include/cxxformat/string.hpp +++ b/include/cxxformat/string.hpp @@ -21,5 +21,7 @@ namespace format { } } - using compile_time::operator ""_format; + inline namespace literals { + using compile_time::operator ""_format; + } } @@ -17,8 +17,10 @@ void numberTests() int main(int argc, char* argv[]) { - using namespace format; + using namespace format::literals; using format::format; + using format::format_to; + using format::format_nothrow_to; if (argc == 2) { |
