mirror of
https://github.com/BlackMATov/flat.hpp.git
synced 2025-12-13 17:48:14 +07:00
add noexcept to iterator getters
This commit is contained in:
@@ -181,43 +181,83 @@ namespace flat_hpp
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator begin() noexcept { return data_.begin(); }
|
||||
const_iterator begin() const noexcept { return data_.begin(); }
|
||||
const_iterator cbegin() const noexcept { return data_.cbegin(); }
|
||||
iterator begin()
|
||||
noexcept(noexcept(std::declval<container_type&>().begin())) {
|
||||
return data_.begin();
|
||||
}
|
||||
|
||||
iterator end() noexcept { return data_.end(); }
|
||||
const_iterator end() const noexcept { return data_.end(); }
|
||||
const_iterator cend() const noexcept { return data_.cend(); }
|
||||
const_iterator begin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().begin())) {
|
||||
return data_.begin();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin() noexcept { return data_.rbegin(); }
|
||||
const_reverse_iterator rbegin() const noexcept { return data_.rbegin(); }
|
||||
const_reverse_iterator crbegin() const noexcept { return data_.crbegin(); }
|
||||
const_iterator cbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().cbegin())) {
|
||||
return data_.cbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rend() noexcept { return data_.rend(); }
|
||||
const_reverse_iterator rend() const noexcept { return data_.rend(); }
|
||||
const_reverse_iterator crend() const noexcept { return data_.crend(); }
|
||||
iterator end()
|
||||
noexcept(noexcept(std::declval<container_type&>().end())) {
|
||||
return data_.end();
|
||||
}
|
||||
|
||||
const_iterator end() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().end())) {
|
||||
return data_.end();
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().cend())) {
|
||||
return data_.cend();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin()
|
||||
noexcept(noexcept(std::declval<container_type&>().rbegin())) {
|
||||
return data_.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator rbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().rbegin())) {
|
||||
return data_.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator crbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().crbegin())) {
|
||||
return data_.crbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rend()
|
||||
noexcept(noexcept(std::declval<container_type&>().rend())) {
|
||||
return data_.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator rend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().rend())) {
|
||||
return data_.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator crend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().crend())) {
|
||||
return data_.crend();
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().empty()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().empty())) {
|
||||
return data_.empty();
|
||||
}
|
||||
|
||||
size_type size() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().size()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().size())) {
|
||||
return data_.size();
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().max_size()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().max_size())) {
|
||||
return data_.max_size();
|
||||
}
|
||||
|
||||
size_type capacity() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().capacity()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().capacity())) {
|
||||
return data_.capacity();
|
||||
}
|
||||
|
||||
@@ -309,8 +349,7 @@ namespace flat_hpp
|
||||
}
|
||||
|
||||
void clear()
|
||||
noexcept(noexcept(std::declval<container_type&>().clear()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<container_type&>().clear())) {
|
||||
data_.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -181,43 +181,83 @@ namespace flat_hpp
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator begin() noexcept { return data_.begin(); }
|
||||
const_iterator begin() const noexcept { return data_.begin(); }
|
||||
const_iterator cbegin() const noexcept { return data_.cbegin(); }
|
||||
iterator begin()
|
||||
noexcept(noexcept(std::declval<container_type&>().begin())) {
|
||||
return data_.begin();
|
||||
}
|
||||
|
||||
iterator end() noexcept { return data_.end(); }
|
||||
const_iterator end() const noexcept { return data_.end(); }
|
||||
const_iterator cend() const noexcept { return data_.cend(); }
|
||||
const_iterator begin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().begin())) {
|
||||
return data_.begin();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin() noexcept { return data_.rbegin(); }
|
||||
const_reverse_iterator rbegin() const noexcept { return data_.rbegin(); }
|
||||
const_reverse_iterator crbegin() const noexcept { return data_.crbegin(); }
|
||||
const_iterator cbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().cbegin())) {
|
||||
return data_.cbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rend() noexcept { return data_.rend(); }
|
||||
const_reverse_iterator rend() const noexcept { return data_.rend(); }
|
||||
const_reverse_iterator crend() const noexcept { return data_.crend(); }
|
||||
iterator end()
|
||||
noexcept(noexcept(std::declval<container_type&>().end())) {
|
||||
return data_.end();
|
||||
}
|
||||
|
||||
const_iterator end() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().end())) {
|
||||
return data_.end();
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().cend())) {
|
||||
return data_.cend();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin()
|
||||
noexcept(noexcept(std::declval<container_type&>().rbegin())) {
|
||||
return data_.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator rbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().rbegin())) {
|
||||
return data_.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator crbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().crbegin())) {
|
||||
return data_.crbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rend()
|
||||
noexcept(noexcept(std::declval<container_type&>().rend())) {
|
||||
return data_.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator rend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().rend())) {
|
||||
return data_.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator crend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().crend())) {
|
||||
return data_.crend();
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().empty()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().empty())) {
|
||||
return data_.empty();
|
||||
}
|
||||
|
||||
size_type size() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().size()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().size())) {
|
||||
return data_.size();
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().max_size()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().max_size())) {
|
||||
return data_.max_size();
|
||||
}
|
||||
|
||||
size_type capacity() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().capacity()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().capacity())) {
|
||||
return data_.capacity();
|
||||
}
|
||||
|
||||
@@ -305,8 +345,7 @@ namespace flat_hpp
|
||||
}
|
||||
|
||||
void clear()
|
||||
noexcept(noexcept(std::declval<container_type&>().clear()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<container_type&>().clear())) {
|
||||
data_.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -126,43 +126,83 @@ namespace flat_hpp
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator begin() noexcept { return data_.begin(); }
|
||||
const_iterator begin() const noexcept { return data_.begin(); }
|
||||
const_iterator cbegin() const noexcept { return data_.cbegin(); }
|
||||
iterator begin()
|
||||
noexcept(noexcept(std::declval<container_type&>().begin())) {
|
||||
return data_.begin();
|
||||
}
|
||||
|
||||
iterator end() noexcept { return data_.end(); }
|
||||
const_iterator end() const noexcept { return data_.end(); }
|
||||
const_iterator cend() const noexcept { return data_.cend(); }
|
||||
const_iterator begin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().begin())) {
|
||||
return data_.begin();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin() noexcept { return data_.rbegin(); }
|
||||
const_reverse_iterator rbegin() const noexcept { return data_.rbegin(); }
|
||||
const_reverse_iterator crbegin() const noexcept { return data_.crbegin(); }
|
||||
const_iterator cbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().cbegin())) {
|
||||
return data_.cbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rend() noexcept { return data_.rend(); }
|
||||
const_reverse_iterator rend() const noexcept { return data_.rend(); }
|
||||
const_reverse_iterator crend() const noexcept { return data_.crend(); }
|
||||
iterator end()
|
||||
noexcept(noexcept(std::declval<container_type&>().end())) {
|
||||
return data_.end();
|
||||
}
|
||||
|
||||
const_iterator end() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().end())) {
|
||||
return data_.end();
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().cend())) {
|
||||
return data_.cend();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin()
|
||||
noexcept(noexcept(std::declval<container_type&>().rbegin())) {
|
||||
return data_.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator rbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().rbegin())) {
|
||||
return data_.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator crbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().crbegin())) {
|
||||
return data_.crbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rend()
|
||||
noexcept(noexcept(std::declval<container_type&>().rend())) {
|
||||
return data_.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator rend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().rend())) {
|
||||
return data_.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator crend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().crend())) {
|
||||
return data_.crend();
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().empty()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().empty())) {
|
||||
return data_.empty();
|
||||
}
|
||||
|
||||
size_type size() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().size()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().size())) {
|
||||
return data_.size();
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().max_size()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().max_size())) {
|
||||
return data_.max_size();
|
||||
}
|
||||
|
||||
size_type capacity() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().capacity()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().capacity())) {
|
||||
return data_.capacity();
|
||||
}
|
||||
|
||||
@@ -220,8 +260,7 @@ namespace flat_hpp
|
||||
}
|
||||
|
||||
void clear()
|
||||
noexcept(noexcept(std::declval<container_type&>().clear()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<container_type&>().clear())) {
|
||||
data_.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -126,43 +126,83 @@ namespace flat_hpp
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator begin() noexcept { return data_.begin(); }
|
||||
const_iterator begin() const noexcept { return data_.begin(); }
|
||||
const_iterator cbegin() const noexcept { return data_.cbegin(); }
|
||||
iterator begin()
|
||||
noexcept(noexcept(std::declval<container_type&>().begin())) {
|
||||
return data_.begin();
|
||||
}
|
||||
|
||||
iterator end() noexcept { return data_.end(); }
|
||||
const_iterator end() const noexcept { return data_.end(); }
|
||||
const_iterator cend() const noexcept { return data_.cend(); }
|
||||
const_iterator begin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().begin())) {
|
||||
return data_.begin();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin() noexcept { return data_.rbegin(); }
|
||||
const_reverse_iterator rbegin() const noexcept { return data_.rbegin(); }
|
||||
const_reverse_iterator crbegin() const noexcept { return data_.crbegin(); }
|
||||
const_iterator cbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().cbegin())) {
|
||||
return data_.cbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rend() noexcept { return data_.rend(); }
|
||||
const_reverse_iterator rend() const noexcept { return data_.rend(); }
|
||||
const_reverse_iterator crend() const noexcept { return data_.crend(); }
|
||||
iterator end()
|
||||
noexcept(noexcept(std::declval<container_type&>().end())) {
|
||||
return data_.end();
|
||||
}
|
||||
|
||||
const_iterator end() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().end())) {
|
||||
return data_.end();
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().cend())) {
|
||||
return data_.cend();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin()
|
||||
noexcept(noexcept(std::declval<container_type&>().rbegin())) {
|
||||
return data_.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator rbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().rbegin())) {
|
||||
return data_.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator crbegin() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().crbegin())) {
|
||||
return data_.crbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rend()
|
||||
noexcept(noexcept(std::declval<container_type&>().rend())) {
|
||||
return data_.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator rend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().rend())) {
|
||||
return data_.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator crend() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().crend())) {
|
||||
return data_.crend();
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().empty()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().empty())) {
|
||||
return data_.empty();
|
||||
}
|
||||
|
||||
size_type size() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().size()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().size())) {
|
||||
return data_.size();
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().max_size()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().max_size())) {
|
||||
return data_.max_size();
|
||||
}
|
||||
|
||||
size_type capacity() const
|
||||
noexcept(noexcept(std::declval<const container_type&>().capacity()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<const container_type&>().capacity())) {
|
||||
return data_.capacity();
|
||||
}
|
||||
|
||||
@@ -224,8 +264,7 @@ namespace flat_hpp
|
||||
}
|
||||
|
||||
void clear()
|
||||
noexcept(noexcept(std::declval<container_type&>().clear()))
|
||||
{
|
||||
noexcept(noexcept(std::declval<container_type&>().clear())) {
|
||||
data_.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -75,10 +75,24 @@ TEST_CASE("flat_map") {
|
||||
STATIC_REQUIRE(std::is_nothrow_swappable_v<map2_t>);
|
||||
STATIC_REQUIRE(!std::is_nothrow_swappable_v<map3_t>);
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().empty()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().max_size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().capacity()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().begin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().begin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().cbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().end()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().end()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().cend()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().rbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().rbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().crbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().rend()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().rend()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().crend()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().empty()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().max_size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().capacity()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().clear()));
|
||||
}
|
||||
|
||||
@@ -75,10 +75,24 @@ TEST_CASE("flat_multimap") {
|
||||
STATIC_REQUIRE(std::is_nothrow_swappable_v<map2_t>);
|
||||
STATIC_REQUIRE(!std::is_nothrow_swappable_v<map3_t>);
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().empty()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().max_size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().capacity()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().begin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().begin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().cbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().end()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().end()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().cend()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().rbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().rbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().crbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().rend()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().rend()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().crend()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().empty()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().max_size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const map_t&>().capacity()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<map_t&>().clear()));
|
||||
}
|
||||
|
||||
@@ -75,10 +75,24 @@ TEST_CASE("flat_multiset") {
|
||||
STATIC_REQUIRE(std::is_nothrow_swappable_v<set2_t>);
|
||||
STATIC_REQUIRE(!std::is_nothrow_swappable_v<set3_t>);
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().empty()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().max_size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().capacity()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().begin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().begin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().cbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().end()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().end()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().cend()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().rbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().rbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().crbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().rend()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().rend()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().crend()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().empty()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().max_size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().capacity()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().clear()));
|
||||
}
|
||||
|
||||
@@ -75,10 +75,24 @@ TEST_CASE("flat_set") {
|
||||
STATIC_REQUIRE(std::is_nothrow_swappable_v<set2_t>);
|
||||
STATIC_REQUIRE(!std::is_nothrow_swappable_v<set3_t>);
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().empty()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().max_size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().capacity()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().begin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().begin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().cbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().end()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().end()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().cend()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().rbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().rbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().crbegin()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().rend()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().rend()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().crend()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().empty()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().max_size()));
|
||||
STATIC_REQUIRE(noexcept(std::declval<const set_t&>().capacity()));
|
||||
|
||||
STATIC_REQUIRE(noexcept(std::declval<set_t&>().clear()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user