[LLVMbugs] [Bug 13289] New: Assert on invalid: getSema().ArgumentPackSubstitutionIndex < (int)Arg.pack_size()

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 6 20:29:44 PDT 2012


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

             Bug #: 13289
           Summary: Assert on invalid:
                    getSema().ArgumentPackSubstitutionIndex <
                    (int)Arg.pack_size()
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ace2001ac at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Assert on the following code:


typedef unsigned int size_t;
static_assert(sizeof(size_t) == sizeof(void*),"");

template <class T>
struct remove_reference { typedef T type; };

template <class T>
struct remove_reference<T&> { typedef T type; };

template <class T>
struct remove_reference<T&&> { typedef T type; };

template <class T> T&&
forward(typename remove_reference<T>::type& t) noexcept {
   return static_cast<T&&>(t);
}
template <class T> T&&
forward(typename remove_reference<T>::type&& t) noexcept {
   return static_cast<T&&>(t);
}

template<class... Ts>
struct B : public Ts... {
  B() = default;

  template <class... UTs>
    explicit B(UTs&&... uts) :
    Ts(forward<UTs>(uts))... {}
};

template <class... Types>
class D : public B<Types...> {
public:
  D() = default;

  D(const D& t) : B<Types...>(t) {}
};

struct S1 {}; struct S2 {};

int main() {
  D<S1, S2> t1;
  D<S1, S2> t2 = t1;
}

-- 
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.



More information about the llvm-bugs mailing list