I am reading about deduction guides in C++17. So say we have the following example:
template<typename T> struct Custom
{
};
template<typename T> struct Person
{
Person(Custom<T> const&);
Person(Custom<T>&&);
};
template<typename T> Person(Custom<T>) -> Person<T>; //explicitly declared deduction guide
My question is that will the explicit declaration for the explicit deduction guide(as shown above) disable the formation of the 2 implicit deduction guides(corresponding to the 2 ctors of class template Person
) that would have been there if we did not specify an explicit deduction guide. I mean, suppose in the above example, there was no explicit deduction guide, then there will be 2 implicit deduction guides(corresponding to the two constructors of Person
). But after we have added explicit guide, will we have a total of 1 deduction guide(explicitly declared by us the user) or 3 deduction guides(including 2 implicit deduction guides).
PS: Note that the question is only about the deduction guides for Person
and not about whether implicit guide will be formed for Custom
.