We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9867a24 commit 2781321Copy full SHA for 2781321
1 file changed
include/tao/pq/internal/aggregate.hpp
@@ -12,6 +12,19 @@
12
13
namespace tao::pq::internal
14
{
15
+
16
+#if defined( __cpp_structured_bindings ) && ( __cpp_structured_bindings >= 202302L ) && ( __cplusplus >= 202302L )
17
18
+ template< typename T >
19
+ requires( std::is_aggregate_v< T > && !std::is_empty_v< T > && !std::is_union_v< T > )
20
+ constexpr auto tie_aggregate( const T& value ) noexcept
21
+ {
22
+ const auto& [... values ] = value;
23
+ return std::tie( values... );
24
+ }
25
26
+#else
27
28
struct convert_to_any
29
30
template< typename T >
@@ -97,6 +110,8 @@ namespace tao::pq::internal
97
110
#undef TAO_PQ_10
98
111
#undef TAO_PQ_TIE10
99
112
113
+#endif
114
100
115
} // namespace tao::pq::internal
101
116
102
117
#endif
0 commit comments