Date: Sun, 21 Mar 2021 15:54:15 +0100
But this is not a mery forward declaration but circular definition (like CRTP).
This means even if we allow forward declaration it still could not
allow recursion there.
Edward in other mail said that you can forward `is_tag_impl`, if this
will not work (compiler will throw some errors)
then the same will be with your example.
niedz., 21 mar 2021 o 15:41 Omer Rosler via Std-Proposals
<std-proposals_at_[hidden]> napisaĆ(a):
>
> 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
This means even if we allow forward declaration it still could not
allow recursion there.
Edward in other mail said that you can forward `is_tag_impl`, if this
will not work (compiler will throw some errors)
then the same will be with your example.
niedz., 21 mar 2021 o 15:41 Omer Rosler via Std-Proposals
<std-proposals_at_[hidden]> napisaĆ(a):
>
> 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:54:28