C++ Logo

std-proposals

Advanced search

Re: [std-proposals] template params of a function template

From: Anoop Rana <ranaanoop986_at_[hidden]>
Date: Wed, 10 Jul 2024 22:11:56 +0530
A function template is not a function. So you can't extract it param. Also
post the error that you're getting.

On Wed, 10 Jul 2024, 22:09 organicoman via Std-Proposals <
std-proposals_at_[hidden] wrote:

> Hello Gents,
> Given this case:
> *****
> // primary template
> template<void(*)(int)>
> struct A;
>
> // specialization
> template<typename T, typename V
> ,template<typename, typename> F
> ,void (*(F<T,V>)(int)>
> struct A<F> { };
> ******
> Why this specialization doesn't compile?
> And how to extract the template params of a function template, let say
>
> template<typename T, typename V>
> void foo(int) {};
>
> In a templated struct that accepts function pointers, let say
>
> template<void(*)(int)>
> struct A { // impl };
>
> Regards
> Nadir
>
>
>
> Sent from my Galaxy
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2024-07-10 16:42:10