https://bugs.llvm.org/show_bug.cgi?id=45728

            Bug ID: 45728
           Summary: Problem with template template parameter SFINAE
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: CUDA
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

The following code compiles with Clang 9 when compiling for CPUs, but not for
CUDA:

    template<typename T>
    using Identity = T;

    template<template<typename> typename>
    struct TemplateSink;

    template<typename T>
    struct Trait
    {
        static constexpr auto value = false;
    };

    template<typename T>
    struct Trait<Identity<TemplateSink<T::template nested>>>
    {
        static constexpr auto value = true;
    };


error: template argument for template template parameter must be a class
template or type alias template
struct Trait<Identity<TemplateSink<T::template nested>>>
                                   ^
error: expected a type
};
 ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to