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

           Summary: Warns "this partial specialization will never be
                    used", but still (correctly) uses it.
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangb...@nondot.org
        ReportedBy: schaub-johan...@web.de
                CC: llvmbugs@cs.uiuc.edu, dgre...@apple.com


Clang wrongfully warns about the following "check" partial specialization

// cut

struct X {
  template <typename T>
  struct Y { };
};

template <typename T1, typename T2, typename = void>
struct A { };

template<typename X>
struct hasit {

template<typename T>
struct check { };

/* notice: X is known here, doesn't need deduction! */
template<typename T>
struct check< typename X::template Y<T> > {
  typedef void does;
  typedef T arg1_type;
};

};

template<typename X, typename T>
struct A< X, T, typename hasit<X>::template check<T>::does > {
     typedef int Type;
};

A<X, X::Y<int> >::Type t;

// cut

It compiles and links fine.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to