[LLVMbugs] [Bug 12699] New: crash with unexpanded parameter pack used in alias template

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 29 19:17:11 PDT 2012


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

             Bug #: 12699
           Summary: crash with unexpanded parameter pack used in alias
                    template
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zilla at kayari.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


template<bool B>
struct bool_constant
{
  static const bool value = B;
};

template<typename... A>
struct F
{
  template<typename... B>
    using SameSize = bool_constant<sizeof...(A) == sizeof...(B)>;

  template<typename... B, typename = SameSize<B>>
  F(B...) { }

};

int main()
{
  F<int> f1(3);
}


clang:
/home/redi/src/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2560:
llvm::PointerUnion<clang::Decl*, llvm::SmallVector<clang::Decl*, 4u>*>*
clang::LocalInstantiationScope::findInstantiationOf(const clang::Decl*):
Assertion `isa<LabelDecl>(D) && "declaration not instantiated in this scope"'
failed.

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