|
Boost : |
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2021-03-24 14:53:25
On 3/24/21 5:45 PM, Bjorn Reese via Boost wrote:
>
> You can use C++20 std::type_identity (or roll your own) to prevent the
> second T from being deduced. In Richard Smith's example:
>
> template<class T, bool (*F)(std::type_identity_t<T>), int> struct X;
> template<class T, bool (*F)(std::type_identity_t<T>)> struct X<T, F, 0> {};
> X<char const, nullptr, 0> x;
As I commented in the clang bug, I don't think you should have to do
this. There is only one T this template, and it is explicitly specified
at the point of template instantiation, so there's nothing to deduce.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk