Skip to content

Commit

Permalink
Changed the order of at()
Browse files Browse the repository at this point in the history
  • Loading branch information
akr-akari authored and jeking3 committed May 3, 2022
1 parent 29e1d40 commit d4be7a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dynamic_bitset.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ <h3><a id ="synopsis">Synopsis</a></h3>
dynamic_bitset&amp; <a href="#flip3">flip</a>(size_type n, size_type len);
dynamic_bitset&amp; <a href="#flip2">flip</a>(size_type n);
dynamic_bitset&amp; <a href="#flip1">flip</a>();
bool <a href="#const-at">at</a>(size_type n) const;
reference <a href="#at">at</a>(size_type n);
bool <a href="#const-at">at</a>(size_type n) const;
bool <a href="#test">test</a>(size_type n) const;
bool <a href="#test">test_set</a>(size_type n, bool val = true);
bool <a href="#all">all</a>() const;
Expand Down Expand Up @@ -1254,7 +1254,7 @@ <h3><a id="member-functions">Member Functions</a></h3>

<hr />
<pre>
bool <a id="const-at">at</a>(size_type n) const
reference <a id="at">at</a>(size_type n)
</pre>

<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br />
Expand All @@ -1263,7 +1263,7 @@ <h3><a id="member-functions">Member Functions</a></h3>

<hr />
<pre>
reference <a id="at">at</a>(size_type n)
bool <a id="const-at">at</a>(size_type n) const
</pre>

<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br />
Expand Down
8 changes: 4 additions & 4 deletions include/boost/dynamic_bitset/dynamic_bitset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ class dynamic_bitset
dynamic_bitset& flip(size_type n, size_type len);
dynamic_bitset& flip(size_type n);
dynamic_bitset& flip();
bool at(size_type n) const;
reference at(size_type n);
bool at(size_type n) const;
bool test(size_type n) const;
bool test_set(size_type n, bool val = true);
bool all() const;
Expand Down Expand Up @@ -1117,7 +1117,8 @@ bool dynamic_bitset<Block, Allocator>::m_unchecked_test(size_type pos) const
}

template <typename Block, typename Allocator>
bool dynamic_bitset<Block, Allocator>::at(size_type pos) const
typename dynamic_bitset<Block, Allocator>::reference
dynamic_bitset<Block, Allocator>::at(size_type pos)
{
if (pos >= m_num_bits)
BOOST_THROW_EXCEPTION(std::out_of_range("boost::dynamic_bitset::at out_of_range"));
Expand All @@ -1126,8 +1127,7 @@ bool dynamic_bitset<Block, Allocator>::at(size_type pos) const
}

template <typename Block, typename Allocator>
typename dynamic_bitset<Block, Allocator>::reference
dynamic_bitset<Block, Allocator>::at(size_type pos)
bool dynamic_bitset<Block, Allocator>::at(size_type pos) const
{
if (pos >= m_num_bits)
BOOST_THROW_EXCEPTION(std::out_of_range("boost::dynamic_bitset::at out_of_range"));
Expand Down

0 comments on commit d4be7a4

Please sign in to comment.