[v3 PATCH] Make the default constructors of tuple and pair conditionally explicit.

Paolo Carlini paolo.carlini@oracle.com
Mon Nov 2 15:19:00 GMT 2015


Hi Ville,

On 11/01/2015 04:27 AM, Ville Voutilainen wrote:
> In the last meeting, while processing LWG 2510, LWG's guidance
> was to make the default constructors of pair and tuple conditionally
> explicit. This patch implements a new trait and uses it in pair and tuple.
>
> Paolo, Jonathan is traveling and somewhat unlikely to be able to review
> this for quite some time, could you please review this patch?
Sure, Jonathan told me a few weeks ago. Note anyway that I would not 
expect major issues with committing this kind of patch even after the 
end of Stage 1...

Anyway, so far the only detail which makes me a little nervous is the 
following:

+  template <typename _Tp>
+    struct __is_implicitly_default_constructible
+      : public integral_constant<bool,
+                    (is_default_constructible<_Tp>::value
+                    && __is_implicitly_default_constructible_safe<_Tp>::value)>


I think we want to use __and_ (note that there isn't a single logical && 
in the whole type_traits, outside macros).

Paolo.



More information about the Libstdc++ mailing list