Skip to content

Commit

Permalink
Add fmt::is_contiguous<std::basic_string<Char, Traits, Allocator>>
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
  • Loading branch information
phprus authored and vitaut committed Jan 10, 2024
1 parent 961df82 commit 6f5d53c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <limits> // std::numeric_limits
#include <memory> // std::uninitialized_copy
#include <stdexcept> // std::runtime_error
#include <string> // std::basic_string
#include <system_error> // std::system_error

#ifdef __cpp_lib_bit_cast
Expand Down Expand Up @@ -278,6 +279,11 @@ template <typename T> struct iterator_traits<fmt::basic_appender<T>> {
} // namespace std

FMT_BEGIN_NAMESPACE

template <typename Char, typename Traits, typename Allocator>
struct is_contiguous<std::basic_string<Char, Traits, Allocator>>
: std::true_type {};

namespace detail {

FMT_CONSTEXPR inline void abort_fuzzing_if(bool condition) {
Expand Down

0 comments on commit 6f5d53c

Please sign in to comment.