Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22209

show current (implicit) deduction guides

$
0
0

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);}

Viewing all articles
Browse latest Browse all 22209

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>