Skip to content

Commit

Permalink
Move definitions of begin()/end() from public "bi.hpp" to private…
Browse files Browse the repository at this point in the history
… src dir
  • Loading branch information
OTheDev committed Mar 4, 2024
1 parent 0a91ace commit e37fe05
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/bi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ class BI_API bi_t {
void resize_unsafe_(size_t new_size);
void trim() noexcept;

auto begin() noexcept { return vec_.begin(); }
auto begin() const noexcept { return vec_.begin(); }
auto end() noexcept { return vec_.end(); }
auto end() const noexcept { return vec_.end(); }
auto rbegin() noexcept { return vec_.rbegin(); }
auto rbegin() const noexcept { return vec_.rbegin(); }
auto rend() noexcept { return vec_.rend(); }
auto rend() const noexcept { return vec_.rend(); }
auto begin() noexcept;
auto begin() const noexcept;
auto end() noexcept;
auto end() const noexcept;
auto rbegin() noexcept;
auto rbegin() const noexcept;
auto rend() noexcept;
auto rend() const noexcept;

/// @cond
friend struct h_;
Expand Down
9 changes: 9 additions & 0 deletions src/bi.inl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ inline void bi_t::trim() noexcept {

///@}

inline auto bi_t::begin() noexcept { return vec_.begin(); }
inline auto bi_t::begin() const noexcept { return vec_.begin(); }
inline auto bi_t::end() noexcept { return vec_.end(); }
inline auto bi_t::end() const noexcept { return vec_.end(); }
inline auto bi_t::rbegin() noexcept { return vec_.rbegin(); }
inline auto bi_t::rbegin() const noexcept { return vec_.rbegin(); }
inline auto bi_t::rend() noexcept { return vec_.rend(); }
inline auto bi_t::rend() const noexcept { return vec_.rend(); }

} // namespace bi

#endif // BI_SRC_BI_INL_
1 change: 1 addition & 0 deletions src/h_.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SPDX-License-Identifier: Apache-2.0
#include <utility>

#include "bi.hpp"
#include "bi.inl"
#include "bi_exceptions.hpp"
#include "constants.hpp"
#include "uints.hpp"
Expand Down

0 comments on commit e37fe05

Please sign in to comment.