mirror of
https://github.com/boostorg/core.git
synced 2025-09-25 08:40:56 +02:00
Add a std::formatter specialization for core::string_view. Fixes #190.
This commit is contained in:
@@ -34,6 +34,9 @@
|
|||||||
#if !defined(BOOST_NO_CXX20_HDR_CONCEPTS) // std::common_reference_with
|
#if !defined(BOOST_NO_CXX20_HDR_CONCEPTS) // std::common_reference_with
|
||||||
# include <type_traits>
|
# include <type_traits>
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(BOOST_NO_CXX20_HDR_FORMAT)
|
||||||
|
# include <format> // std::formatter
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@@ -1261,4 +1264,15 @@ struct std::basic_common_reference<
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// std::format support
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_CXX20_HDR_FORMAT)
|
||||||
|
|
||||||
|
template<class Ch, class Ch2>
|
||||||
|
struct std::formatter<boost::core::basic_string_view<Ch>, Ch2>: std::formatter<std::basic_string_view<Ch>, Ch2>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // #ifndef BOOST_CORE_STRING_VIEW_HPP_INCLUDED
|
#endif // #ifndef BOOST_CORE_STRING_VIEW_HPP_INCLUDED
|
||||||
|
Reference in New Issue
Block a user