mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
I shouldn't be there
This commit is contained in:
@ -935,11 +935,11 @@ template <typename T> class buffer {
|
|||||||
/** Appends data to the end of the buffer. */
|
/** Appends data to the end of the buffer. */
|
||||||
template <typename U> void append(const U* begin, const U* end);
|
template <typename U> void append(const U* begin, const U* end);
|
||||||
|
|
||||||
template <typename I> FMT_CONSTEXPR auto operator[](I index) -> T& {
|
template <typename Idx> FMT_CONSTEXPR auto operator[](Idx index) -> T& {
|
||||||
return ptr_[index];
|
return ptr_[index];
|
||||||
}
|
}
|
||||||
template <typename I>
|
template <typename Idx>
|
||||||
FMT_CONSTEXPR auto operator[](I index) const -> const T& {
|
FMT_CONSTEXPR auto operator[](Idx index) const -> const T& {
|
||||||
return ptr_[index];
|
return ptr_[index];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,9 @@
|
|||||||
#include "test-assert.h"
|
#include "test-assert.h"
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
#define I 42 // simulate https://en.cppreference.com/w/c/numeric/complex/I
|
||||||
#include "fmt/core.h"
|
#include "fmt/core.h"
|
||||||
|
#undef I
|
||||||
|
|
||||||
#include <algorithm> // std::copy_n
|
#include <algorithm> // std::copy_n
|
||||||
#include <climits> // INT_MAX
|
#include <climits> // INT_MAX
|
||||||
|
Reference in New Issue
Block a user