You are not logged in.

#1 2014-10-14 17:28:52

n0fun
Member
Registered: 2011-09-18
Posts: 2

g++ (GCC) 4.9.1 20140903 (prerelease) bug?

g++ --version

g++ (GCC) 4.9.1 20140903 (prerelease)

g++ -std=c++14 -Wall -Wextra source.cpp

source.cpp :

template <typename... Vs>
struct A
{
  template <Vs... vs>
  struct B { };
};

int main()
{
  A<int>::B<10> test1; // OK
  A<>::B<> test2; // error: wrong number of template arguments (1, should be 0)
}

error with current gcc package (4.9.1-2)
ok with g++ 4.8 and clang++ 3.5.0

is it a gcc 4.9 bug or something wrong with gcc package? (or my knowledge of c++?)

Offline

Board footer

Powered by FluxBB