Skip to content

Commit

Permalink
remove unnecessary const #7
Browse files Browse the repository at this point in the history
copied from #7, forgot that github is a mirror now
  • Loading branch information
tcsullivan committed Jan 2, 2025
1 parent bd157e5 commit 7dd3348
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions f_to_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]; }
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions to_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]; }
Expand All @@ -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
Expand Down

0 comments on commit 7dd3348

Please sign in to comment.