On 15 August 2016 at 12:53, Jonathan Wakely <jwak...@redhat.com> wrote: >> + template<typename> >> + struct __is_in_place_impl : false_type >> + { }; >> + >> + template<typename _Tp> >> + struct __is_in_place_impl<in_place_type_t<_Tp>> : true_type > Indentation nit.
Will fix. > >> + { }; >> + >> + template<typename _Tp> >> + struct __is_in_place >> + : public >> __is_in_place_impl<std::remove_cv_t<std::remove_reference_t<_Tp>>> > > > Any reason not to use decay_t here? In all the cases where decay is > different to stripping references and cv-qualifiers the result will be > false either way. > > I wouldn't have bothered with the std:: qualification either, but it's > fine as it is. The reason for not using decay and for the qualification is that the trait is closely related to its copy-paste origin, which is __is_optional. ;) I should also add a test for the case where in_place is attempted to pass through the ValueType&& parameter, aka a case where a type is not default-constructible but is constructible from in_place, and in_place-construction is used.