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.
2 parents bc0af77 + e73bb66 commit afc2b96Copy full SHA for afc2b96
src/libutil/include/nix/util/variant-wrapper.hh
@@ -22,10 +22,12 @@
22
*
23
* The moral equivalent of `using Raw::Raw;`
24
*/
25
-#define MAKE_WRAPPER_CONSTRUCTOR(CLASS_NAME) \
26
- FORCE_DEFAULT_CONSTRUCTORS(CLASS_NAME) \
27
- \
28
- CLASS_NAME(auto &&... arg) \
29
- : raw(std::forward<decltype(arg)>(arg)...) \
30
- { \
+#define MAKE_WRAPPER_CONSTRUCTOR(CLASS_NAME) \
+ FORCE_DEFAULT_CONSTRUCTORS(CLASS_NAME) \
+ \
+ template<typename... Args> \
+ requires(!(sizeof...(Args) == 1 && (std::is_same_v<std::remove_cvref_t<Args>, CLASS_NAME> && ...))) \
+ CLASS_NAME(Args &&... arg) \
31
+ : raw(std::forward<Args>(arg)...) \
32
+ { \
33
}
0 commit comments