mirror of
https://github.com/boostorg/core.git
synced 2025-07-31 21:34:42 +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
|
||||
# include <type_traits>
|
||||
#endif
|
||||
#if !defined(BOOST_NO_CXX20_HDR_FORMAT)
|
||||
# include <format> // std::formatter
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@@ -1261,4 +1264,15 @@ struct std::basic_common_reference<
|
||||
|
||||
#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
|
||||
|
Reference in New Issue
Block a user