File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ class router_base
3939
4040 virtual ~router_base ();
4141
42+ router_base (router_base const &) = delete ;
43+ router_base& operator =(router_base const &) = delete ;
44+ router_base (router_base&&) noexcept = default ;
45+ router_base& operator =(router_base&&) noexcept = default ;
46+
4247 void
4348 insert_impl (
4449 core::string_view s,
Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ class router
5454 // / Constructor
5555 router () = default ;
5656
57+ router (router const &) = delete ;
58+ router& operator =(router const &) = delete ;
59+ router (router&&) noexcept = default ;
60+ router& operator =(router&&) noexcept = default ;
61+
5762 /* * Route the specified URL path to a resource
5863
5964 @param path A url path with dynamic segments
@@ -88,4 +93,3 @@ class router
8893#include " impl/router.hpp"
8994
9095#endif
91-
Original file line number Diff line number Diff line change 1616
1717#include " test_suite.hpp"
1818
19+ #include < type_traits>
20+
1921namespace boost {
2022namespace urls {
2123
24+ static_assert (!std::is_copy_constructible<router<int >>::value,
25+ " router should be move-only" );
26+ static_assert (!std::is_copy_assignable<router<int >>::value,
27+ " router should be move-only" );
28+ static_assert (std::is_move_constructible<router<int >>::value,
29+ " router should support moves" );
30+ static_assert (std::is_move_assignable<router<int >>::value,
31+ " router should support moves" );
32+
2233struct router_test
2334{
2435 static
You can’t perform that action at this time.
0 commit comments