mirror of
https://github.com/fmtlib/fmt.git
synced 2025-02-21 21:41:07 +00:00
Disable consteval in Apple clang
This commit is contained in:
parent
d9a731d486
commit
807ee5ec31
@ -247,10 +247,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FMT_CONSTEVAL
|
#ifndef FMT_CONSTEVAL
|
||||||
# if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \
|
# if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \
|
||||||
__cplusplus > 201703L) || \
|
__cplusplus > 201703L && !defined(__apple_build_version__)) || \
|
||||||
(defined(__cpp_consteval) && \
|
(defined(__cpp_consteval) && \
|
||||||
!FMT_MSC_VER) // consteval is broken in MSVC.
|
!FMT_MSC_VER) // consteval is broken in MSVC and Apple clang 13.
|
||||||
# define FMT_CONSTEVAL consteval
|
# define FMT_CONSTEVAL consteval
|
||||||
# define FMT_HAS_CONSTEVAL
|
# define FMT_HAS_CONSTEVAL
|
||||||
# else
|
# else
|
||||||
@ -872,7 +872,9 @@ class iterator_buffer final : public Traits, public buffer<T> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class iterator_buffer<T*, T, fixed_buffer_traits> final : public fixed_buffer_traits, public buffer<T> {
|
class iterator_buffer<T*, T, fixed_buffer_traits> final
|
||||||
|
: public fixed_buffer_traits,
|
||||||
|
public buffer<T> {
|
||||||
private:
|
private:
|
||||||
T* out_;
|
T* out_;
|
||||||
enum { buffer_size = 256 };
|
enum { buffer_size = 256 };
|
||||||
@ -896,7 +898,9 @@ class iterator_buffer<T*, T, fixed_buffer_traits> final : public fixed_buffer_tr
|
|||||||
explicit iterator_buffer(T* out, size_t n = buffer_size)
|
explicit iterator_buffer(T* out, size_t n = buffer_size)
|
||||||
: fixed_buffer_traits(n), buffer<T>(out, 0, n), out_(out) {}
|
: fixed_buffer_traits(n), buffer<T>(out, 0, n), out_(out) {}
|
||||||
iterator_buffer(iterator_buffer&& other)
|
iterator_buffer(iterator_buffer&& other)
|
||||||
: fixed_buffer_traits(other), buffer<T>(std::move(other)), out_(other.out_) {
|
: fixed_buffer_traits(other),
|
||||||
|
buffer<T>(std::move(other)),
|
||||||
|
out_(other.out_) {
|
||||||
if (this->data() != out_) {
|
if (this->data() != out_) {
|
||||||
this->set(data_, buffer_size);
|
this->set(data_, buffer_size);
|
||||||
this->clear();
|
this->clear();
|
||||||
@ -908,7 +912,9 @@ class iterator_buffer<T*, T, fixed_buffer_traits> final : public fixed_buffer_tr
|
|||||||
flush();
|
flush();
|
||||||
return out_;
|
return out_;
|
||||||
}
|
}
|
||||||
auto count() const -> size_t { return fixed_buffer_traits::count() + this->size(); }
|
auto count() const -> size_t {
|
||||||
|
return fixed_buffer_traits::count() + this->size();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T> class iterator_buffer<T*, T> final : public buffer<T> {
|
template <typename T> class iterator_buffer<T*, T> final : public buffer<T> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user