remove unnecessary const #7

copied from https://github.com/tcsullivan/constexpr-to-string/pull/7, forgot that github is a mirror now
master
Clyne 4 days ago
parent bd157e503a
commit 7dd3348ad8
Signed by: clyne
GPG Key ID: 3267C8EBF3F9AFC7

@ -68,7 +68,7 @@ class f_to_string_t {
constexpr auto size() const noexcept { return sizeof(buf) / sizeof(buf[0]); }
// Element access
constexpr auto data() noexcept { return buf; }
constexpr const auto data() const noexcept { return buf; }
constexpr auto data() const noexcept { return buf; }
constexpr auto& operator[](unsigned int i) noexcept { return buf[i]; }
constexpr const auto& operator[](unsigned int i) const noexcept { return buf[i]; }
constexpr auto& front() noexcept { return buf[0]; }
@ -77,9 +77,9 @@ class f_to_string_t {
constexpr const auto& back() const noexcept { return buf[size() - 1]; }
// Iterators
constexpr auto begin() noexcept { return buf; }
constexpr const auto begin() const noexcept { return buf; }
constexpr auto begin() const noexcept { return buf; }
constexpr auto end() noexcept { return buf + size(); }
constexpr const auto end() const noexcept { return buf + size(); }
constexpr auto end() const noexcept { return buf + size(); }
};
} // namespace constexpr_to_string

@ -58,7 +58,7 @@ class to_string_t {
// Element access
constexpr auto data() noexcept { return buf; }
constexpr const auto data() const noexcept { return buf; }
constexpr auto data() const noexcept { return buf; }
constexpr auto& operator[](unsigned int i) noexcept { return buf[i]; }
constexpr const auto& operator[](unsigned int i) const noexcept { return buf[i]; }
constexpr auto& front() noexcept { return buf[0]; }
@ -68,9 +68,9 @@ class to_string_t {
// Iterators
constexpr auto begin() noexcept { return buf; }
constexpr const auto begin() const noexcept { return buf; }
constexpr auto begin() const noexcept { return buf; }
constexpr auto end() noexcept { return buf + size(); }
constexpr const auto end() const noexcept { return buf + size(); }
constexpr auto end() const noexcept { return buf + size(); }
};
} // namespace constexpr_to_string

Loading…
Cancel
Save