Skip to content

Commit 7e6b9c2

Browse files
committed
Add lifetime annotations to adapter_storage
1 parent 23a625a commit 7e6b9c2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/cpp-sort/utility/adapter_storage.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
////////////////////////////////////////////////////////////
1111
#include <type_traits>
1212
#include <utility>
13+
#include "../detail/config.h"
1314

1415
namespace cppsort::utility
1516
{
@@ -87,24 +88,28 @@ namespace cppsort::utility
8788
}
8889

8990
constexpr auto get() & noexcept
91+
CPPSORT_LIFETIME_BOUND
9092
-> Sorter&
9193
{
9294
return static_cast<Sorter&>(sorter);
9395
}
9496

9597
constexpr auto get() const& noexcept
98+
CPPSORT_LIFETIME_BOUND
9699
-> const Sorter&
97100
{
98101
return static_cast<const Sorter&>(sorter);
99102
}
100103

101104
constexpr auto get() && noexcept
105+
CPPSORT_LIFETIME_BOUND
102106
-> Sorter&&
103107
{
104108
return static_cast<Sorter&&>(sorter);
105109
}
106110

107111
constexpr auto get() const&& noexcept
112+
CPPSORT_LIFETIME_BOUND
108113
-> const Sorter&&
109114
{
110115
return static_cast<const Sorter&&>(sorter);

0 commit comments

Comments
 (0)