****** OBSOLETE - CONCEPTS HAS BEEN MERGED INTO CLANG TRUNK AND DEVELOPMENT CONTINUES THERE ****** This fork of llvm-project contains my implementation of C++2a Concepts for the Clang compiler, and will be updated regularly with bug fixes until the whole feature is merged to trunk. Follow the instructions here https://clang.llvm.org/get_started.html to build, then use the flags "-std=c++2a -Xclang -fconcepts-ts" to enable concepts.
template <typename>
concept AnyType = true;
template <AnyType ... types>
class configuration
{
//!\brief Friend declaration for other instances of the configuration.
template <AnyType ... _types>
friend class configuration;
};
int main()
{
configuration<>{};
return 0;
}
error: associated constraints differ in template redeclaration
<source>:14:5: note: in instantiation of template class 'configuration<>' requested here
configuration<>{};
^
note: template is declared here
The confusing thing is that the error log is truncated and that the friend is not working.
The example works if I remove the friend declaration or exchange AnyType with typename.
The confusing thing is that the error log is truncated and that the friend is not working.
The example works if I remove the friend declaration or exchange
AnyType
withtypename
.See https://godbolt.org/z/iXkRlP