From 71c7f2af301438c2e22f2ae14f7124eddad92350 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Sun, 23 Feb 2020 21:47:41 -0500 Subject: [PATCH] Small bug fix --- doc/qbk/main.qbk | 2 +- include/boost/static_string/static_string.hpp | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/qbk/main.qbk b/doc/qbk/main.qbk index a74a376..9efc58c 100644 --- a/doc/qbk/main.qbk +++ b/doc/qbk/main.qbk @@ -115,7 +115,7 @@ Certain features can be enabled and disabled though defining configuration macro [heading Acknowledgments] -Thanks to [@@https://github.com/K-ballo Agustín Bergé], [@https://github.com/pdimov Peter Dimov], [@https://github.com/glenfe Glen Fernandes], and [@https://github.com/LeonineKing1199 Christian Mazakas] for their constant feedback and guidance during the development of this library. +Thanks to [@https://github.com/K-ballo Agustín Bergé], [@https://github.com/pdimov Peter Dimov], [@https://github.com/glenfe Glen Fernandes], and [@https://github.com/LeonineKing1199 Christian Mazakas] for their constant feedback and guidance during the development of this library. The development of this library was sponsored by [@https://cppalliance.org The C++ Alliance]. diff --git a/include/boost/static_string/static_string.hpp b/include/boost/static_string/static_string.hpp index defbbed..47c5aae 100644 --- a/include/boost/static_string/static_string.hpp +++ b/include/boost/static_string/static_string.hpp @@ -24,7 +24,8 @@ namespace boost { namespace static_strings { -template +#ifndef BOOST_STATIC_STRING_DOCS +template class basic_static_string; //------------------------------------------------------------------------------ @@ -33,7 +34,6 @@ class basic_static_string; // //------------------------------------------------------------------------------ -#ifndef BOOST_STATIC_STRING_DOCS template using static_string = basic_static_string>; @@ -50,6 +50,11 @@ template using static_u32string = basic_static_string>; +#ifdef BOOST_STATIC_STRING_CPP20 +using static_u8string = + basic_static_string>; +#endif + //-------------------------------------------------------------------------- // // Detail @@ -66,7 +71,7 @@ using smallest_width = typename std::conditional<(N <= (std::numeric_limits::max)()), unsigned int, typename std::conditional<(N <= (std::numeric_limits::max)()), unsigned long, typename std::conditional<(N <= (std::numeric_limits::max)()), unsigned long long, - void>::type>::type>::type>::type>::type; + std::size_t>::type>::type>::type>::type>::type; // std::is_nothrow_convertible is C++20 template @@ -721,6 +726,13 @@ defined(BOOST_STATIC_STRING_NO_PTR_COMP_FUNCTIONS) basic_static_string>; @endcode + Addtionally, the alias `static_u8string` is provided in C++20 + + @code + using static_u8string = + basic_static_string>; + @endcode + @see to_static_string */ template