Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary const #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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