Skip to content

Commit

Permalink
Removed unneeded "noexcept" specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
rollbear committed Apr 16, 2024
1 parent 56262f4 commit 51073ea
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
7 changes: 4 additions & 3 deletions include/trompeloeil/mock.hpp
Expand Up @@ -1330,7 +1330,7 @@ template <typename T>
return next != this;
}
protected:
list_elem() noexcept = default;
list_elem() = default;
public:
list_elem* next = this;
list_elem* prev = this;
Expand Down Expand Up @@ -1678,7 +1678,7 @@ template <typename T>

virtual
~sequence_handler_base()
noexcept = default;
= default;

void
increment_call()
Expand Down Expand Up @@ -3224,11 +3224,12 @@ template <typename T>
struct expectations
{
expectations() = default;
expectations(expectations&&) noexcept = default;
expectations(expectations&&) = default;
~expectations() {
active.decommission();
saturated.decommission();
}
expectations& operator=(expectations&&) = default;
call_matcher_list<Sig> active{};
call_matcher_list<Sig> saturated{};
};
Expand Down
6 changes: 3 additions & 3 deletions include/trompeloeil/sequence.hpp
Expand Up @@ -24,10 +24,10 @@ namespace trompeloeil {
class sequence_type
{
public:
sequence_type() noexcept = default;
sequence_type(sequence_type&&) noexcept = delete;
sequence_type() = default;
sequence_type(sequence_type&&) = delete;
sequence_type(const sequence_type&) = delete;
sequence_type& operator=(sequence_type&&) noexcept = delete;
sequence_type& operator=(sequence_type&&) = delete;
sequence_type& operator=(const sequence_type&) = delete;
~sequence_type();

Expand Down
16 changes: 16 additions & 0 deletions test/compiling_tests_11.cpp
Expand Up @@ -5996,3 +5996,19 @@ TEST_CASE_METHOD(
REQUIRE(called);
}

TEST_CASE_METHOD(
Fixture,
"C++11: A named expectation follows a moved mock object assign",
"[C++11][C++14]"
)
{
bool called = false;
movable_mock source;
auto exp = NAMED_REQUIRE_CALL_V(source, func(3),
.LR_SIDE_EFFECT(called = true));
movable_mock dest;
dest = std::move(source);
dest.func(3);
REQUIRE(reports.empty());
REQUIRE(called);
}
6 changes: 3 additions & 3 deletions test/micro_coro.hpp
Expand Up @@ -27,7 +27,7 @@ namespace coro
template<typename T>
struct promise
{
promise() noexcept = default;
promise() = default;

promise &operator=(promise &&) = delete;

Expand Down Expand Up @@ -137,7 +137,7 @@ namespace coro
template<>
struct promise<void>
{
promise() noexcept = default;
promise() = default;
promise &operator=(promise &&) = delete;

std::suspend_never
Expand Down Expand Up @@ -347,7 +347,7 @@ namespace coro
template<typename T>
struct generator_promise
{
generator_promise() noexcept = default;
generator_promise() = default;

generator_promise &operator=(generator_promise &&) = delete;

Expand Down

0 comments on commit 51073ea

Please sign in to comment.