https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68204

            Bug ID: 68204
           Summary: g++ fails to expand a template parameter pack in with
                    variable templates in a function
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: morwenn29 at hotmail dot fr
  Target Milestone: ---

To be honest, the title fails to accurately describe the problem. Anyway, this
sample does the job nicely:

    template<typename... TT>
    void eat(TT...) {}

    template<typename>
    int some_value;

    template<typename... TT>
    void baz()
    {
        eat(some_value<TT>...);
    }

When trying to compile the previous code, g++ emits the following error:

    main.cpp: In function 'void baz()':
    main.cpp:10:23: error: expansion pattern 'some_value<TT>' contains no
argument packs
         eat(some_value<TT>...);
                           ^

If I'm not mistaken, it should be equivalent to eat(some_value<T>,
some_value<U>, some_value<V>) for some types T, U and V and thus feed a bunch
of integers to eat.

Reply via email to