Date: Sun, 21 Mar 2021 14:45:55 +0000
Just forward declare `is_tag_impl`?
On Sun, 21 Mar 2021, 14:41 Omer Rosler via Std-Proposals, <
std-proposals_at_[hidden]> wrote:
> Is there a reason forward declaration of concepts are not allowed?
>
> I wanted such feature in the following snippet:
>
> ```c++
> template<typename T>
> concept tag_type;
>
> //Use the concept in a template declaration, when instantiated, the concept definition will be avilable
> template<template<tag_type> typename ArgsType, template<ArgsType...>
> typename Templ>
> struct template_ {};
> template<typename T>
> struct is_tag_impl : std::false_type {};
> template<template<tag_type> typename ArgsType, template<ArgsType...>
> typename Templ>
> struct is_tag_impl<template_<ArgsType, Templ>> : std::true_type {};
>
> template<typename T>
> concept tag_type = is_tag_impl<T>::value;
>
>
>
> ```
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
On Sun, 21 Mar 2021, 14:41 Omer Rosler via Std-Proposals, <
std-proposals_at_[hidden]> wrote:
> Is there a reason forward declaration of concepts are not allowed?
>
> I wanted such feature in the following snippet:
>
> ```c++
> template<typename T>
> concept tag_type;
>
> //Use the concept in a template declaration, when instantiated, the concept definition will be avilable
> template<template<tag_type> typename ArgsType, template<ArgsType...>
> typename Templ>
> struct template_ {};
> template<typename T>
> struct is_tag_impl : std::false_type {};
> template<template<tag_type> typename ArgsType, template<ArgsType...>
> typename Templ>
> struct is_tag_impl<template_<ArgsType, Templ>> : std::true_type {};
>
> template<typename T>
> concept tag_type = is_tag_impl<T>::value;
>
>
>
> ```
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2021-03-21 09:46:08