I shouldn't be there

This commit is contained in:
Victor Zverovich
2022-08-02 15:49:41 -07:00
parent 6567df7f24
commit 5f774c0aed
2 changed files with 5 additions and 3 deletions

View File

@ -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];
} }
}; };

View File

@ -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