I have the following error message from this question, class template deducation guide for struct-based parameters.
<source>:44:8: error: template parameters not deducible in partial specialization: 44 | struct A3<int> : A<N> { | ^~~~~~~<source>:44:8: note: 'N'Compiler returned: 1
How can I view the deduction guides for A3
and A
?
Edit: Excerpt from the new example in that question:
#include <cstddef>#include <array>template <class... T>constexpr bool always_false = false;template<size_t N>struct A { std::array<int, N> a; A(std::array<int, N> const& a): a{a} {};};// A<0> ... sigh ... so ugly.template <typename T>struct A3 : A<0> { static_assert(always_false<T>, "virtual");};template <size_t N>struct A3<int> : A<N> { A3(std::array<int, N> const& a): A<N>{a} {};};int main() { std::array a {1,2,3,4}; // Unable to deduce N //auto e = A3<int>(a);}