[LLVMbugs] [Bug 19204] New: Compiler fail to reject wrong type when std::enable_if is used variadic template.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 20 01:44:06 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19204

            Bug ID: 19204
           Summary: Compiler fail to reject wrong type when std::enable_if
                    is used variadic template.
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: littlekid87 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code fail to get rejected by the compiler.

#include <type_traits>

template <class Ty1, typename std::enable_if<std::is_integral<Ty1>::value,
Ty1>::type...>
void foo()
{
}

foo<std::string>() // this should be rejected at compile time.

-- 
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/20140320/8b597707/attachment.html>


More information about the llvm-bugs mailing list