Lines Matching full:pack
264 case TemplateArgument::Pack:
265 if (Y.getKind() != TemplateArgument::Pack ||
537 /// \brief Retrieve the depth and index of an unexpanded parameter pack.
558 /// A pack that we're currently deducing.
562 // The index of the pack.
565 // The old value of the pack before we started deducing it.
568 // A deferred value of this pack from an inner deduction, that couldn't be
572 // The new value of the pack.
575 // The outer deduction for this pack, if any.
580 /// A scope in which we're performing pack deduction.
588 // parameter packs expanded by the pack expansion.
599 // Save the deduced template argument for the parameter pack expanded
600 // by this pack expansion, then clear out the deduction.
601 DeducedPack Pack(Index);
602 Pack.Saved = Deduced[Index];
605 Packs.push_back(Pack);
609 assert(!Packs.empty() && "Pack expansion without unexpanded packs?");
611 for (auto &Pack : Packs) {
612 if (Info.PendingDeducedPacks.size() > Pack.Index)
613 Pack.Outer = Info.PendingDeducedPacks[Pack.Index];
615 Info.PendingDeducedPacks.resize(Pack.Index + 1);
616 Info.PendingDeducedPacks[Pack.Index] = &Pack;
619 // If the template argument pack was explicitly specified, add that to
627 getDepthAndIndex(PartiallySubstitutedPack).second == Pack.Index)
628 Pack.New.append(ExplicitArgs, ExplicitArgs + NumExplicitArgs);
634 for (auto &Pack : Packs)
635 Info.PendingDeducedPacks[Pack.Index] = Pack.Outer;
638 /// Move to deducing the next element in each pack that is being deduced.
640 // Capture the deduced template arguments for each parameter pack expanded
641 // by this pack expansion, add them to the list of arguments we've deduced
642 // for that pack, then clear out the deduced argument.
643 for (auto &Pack : Packs) {
644 DeducedTemplateArgument &DeducedArg = Deduced[Pack.Index];
646 Pack.New.push_back(DeducedArg);
657 // pack expansion.
658 for (auto &Pack : Packs) {
659 // Put back the old value for this pack.
660 Deduced[Pack.Index] = Pack.Saved;
662 // Build or find a new value for this pack.
664 if (HasAnyArguments && Pack.New.empty()) {
665 if (Pack.DeferredDeduction.isNull()) {
666 // We were not able to deduce anything for this parameter pack
668 // restore the saved argument pack.
672 NewPack = Pack.DeferredDeduction;
673 Pack.DeferredDeduction = TemplateArgument();
674 } else if (Pack.New.empty()) {
675 // If we deduced an empty argument pack, create it now.
679 new (S.Context) TemplateArgument[Pack.New.size()];
680 std::copy(Pack.New.begin(), Pack.New.end(), ArgumentPack);
682 TemplateArgument(llvm::makeArrayRef(ArgumentPack, Pack.New.size())),
683 Pack.New[0].wasDeducedFromArrayBound());
686 // Pick where we're going to put the merged pack.
688 if (Pack.Outer) {
689 if (Pack.Outer->DeferredDeduction.isNull()) {
690 // Defer checking this pack until we have a complete pack to compare
692 Pack.Outer->DeferredDeduction = NewPack;
695 Loc = &Pack.Outer->DeferredDeduction;
697 Loc = &Deduced[Pack.Index];
700 // Check the new pack matches any previous value.
705 // If we deferred a deduction of this pack, check that one now too.
706 if (!Result.isNull() && !Pack.DeferredDeduction.isNull()) {
708 NewPack = Pack.DeferredDeduction;
714 makeTemplateParameter(TemplateParams->getParam(Pack.Index));
801 // parameter pack and the function parameter associated with P is not
802 // a function parameter pack, then template argument deduction fails.
819 // - A function parameter pack that does not occur at the end of the
826 // parameter pack, then the type of its declarator- id is compared with
829 // template parameter packs expanded by the function parameter pack.
849 // pack expansion.
955 // If the argument type is a pack expansion, look at its pattern.
1153 // pack, do nothing: we don't know which of its arguments to look
1669 // If the template argument is a pack expansion, perform template argument
1699 llvm_unreachable("caller should handle pack expansions");
1763 case TemplateArgument::Pack:
1785 if (Arg.getKind() != TemplateArgument::Pack)
1788 assert(ArgIdx == NumArgs - 1 && "Pack not at the end of argument list?");
1795 /// \brief Determine whether the given set of template arguments has a pack
1804 if (Args[ArgIdx].getKind() == TemplateArgument::Pack) {
1830 // If the template argument list of P contains a pack expansion that is not
1852 // but applied to pack expansions that are template arguments.
1868 // The parameter is a pack expansion.
1871 // If Pi is a pack expansion, then the pattern of Pi is compared with
1878 // and set any deduced parameter packs to an empty argument pack.
1884 // Keep track of the deduced template arguments for each parameter pack
1885 // expanded by this pack expansion (the outer index) and for each
1901 // pack expansion.
1960 case TemplateArgument::Pack:
2048 case TemplateArgument::Pack:
2067 if (Arg.getKind() == TemplateArgument::Pack) {
2068 // This is a template argument pack, so check each of its arguments against
2082 // Move the converted template argument into our argument pack.
2086 // Create the resulting argument pack.
2544 // If we deduced template arguments for a template parameter pack,
2545 // note that the template argument pack is partially substituted and record
2547 // for this template parameter pack.
2550 if (Arg.getKind() == TemplateArgument::Pack) {
2636 if (Arg.getKind() == TemplateArgument::Pack)
2794 // template parameter pack (that may or may not have been extended
2799 // Forget the partially-substituted pack; its substitution is now
2848 // A trailing template parameter pack (14.5.3) not otherwise deduced will
2853 // template parameter pack. If so, our empty deduction extends the
2864 // Forget the partially-substituted pack; it's substitution is now
3443 // For a function parameter pack that occurs at the end of the
3446 // function parameter pack. Each comparison deduces template arguments
3448 // the function parameter pack. For a function parameter pack that does
3450 // the parameter pack is a non-deduced context.
3507 // pack expansion.
3511 // After we've matching against a parameter pack, we're done.
4333 /// ends with a function parameter pack.
4344 // Make sure that no previous parameter is a parameter pack.
4663 // We can deduce from a pack expansion.
4855 // If the template argument list of P contains a pack expansion that is
4897 // If the template argument list of P contains a pack expansion that is not
5004 case TemplateArgument::Pack:
5025 // If the template argument list of P contains a pack expansion that is not