[PATCH] c++: Add __reference_con{struc, ver}ts_from_temporary [PR104477]

Jonathan Wakely jwakely@redhat.com
Mon Jul 11 10:19:19 GMT 2022


On Fri, 8 Jul 2022 at 18:41, Marek Polacek wrote:
> The patch also adds the relevant class and variable templates to <type_traits>.


+  template<typename _Tp, typename _Up>
+    struct reference_constructs_from_temp
orary
+    : public __bool_constant<__reference_constructs_from_temporary(_Tp, _Up)>

This can use bool_constant, as that was added in C++17.
__bool_constant is the internal equivalent for pre-C++17.

The library parts are fine with that change, thanks for implementing this!



More information about the Libstdc++ mailing list