[llvm-bugs] [Bug 45728] New: Problem with template template parameter SFINAE

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 29 01:55:13 PDT 2020


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: unassignedclangbugs at nondot.org
          Reporter: james at invexed.com
                CC: llvm-bugs at lists.llvm.org

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200429/f26a7432/attachment.html>


More information about the llvm-bugs mailing list