File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11#include < simply/copyable.hpp>
22#include < simply/destructible.hpp>
33#include < simply/dyn.hpp>
4+ #include < simply/movable.hpp>
45
56#include < algorithm>
67#include < cassert>
@@ -11,7 +12,7 @@ template <char Label>
1112struct counter {
1213 counter () = default ;
1314 constexpr counter (const counter &other) : copied(other.copied + 1 ) {}
14- counter (counter &&other) = delete ;
15+ counter (counter &&other) noexcept = default ;
1516
1617 auto operator =(const counter &) -> counter & = delete ;
1718 auto operator =(counter &&) -> counter & = delete ;
@@ -60,9 +61,9 @@ struct simply::iface<labeled<LabelT>, Self> {
6061
6162// test dyn<countable> at compile-time
6263static_assert ([] {
63- struct countable : simply::composes<copy_countable< int >, labeled< char >,
64- simply::copyable, simply::destructible> {
65- };
64+ struct countable
65+ : simply::composes<copy_countable< int >, labeled< char >, simply::copyable,
66+ simply::movable, simply::destructible> { };
6667
6768 // initialize a vector of dyn<countable> with three different counter types
6869 std::vector<simply::dyn<countable>> v;
Original file line number Diff line number Diff line change 11#include < simply/destructible.hpp>
22#include < simply/dyn.hpp>
33#include < simply/insertable.hpp>
4+ #include < simply/movable.hpp>
45
56#include < gtest/gtest.h>
67
@@ -10,7 +11,7 @@ TEST(Stream, TypeErasedInsertion) {
1011 using namespace std ::string_literals;
1112
1213 struct mixins : simply::composes<simply::insertable<std::ostream>,
13- simply::destructible> {};
14+ simply::movable, simply:: destructible> {};
1415
1516 std::vector<simply::dyn<mixins>> values;
1617 values.emplace_back (" Hello, world!" s);
You can’t perform that action at this time.
0 commit comments