This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

re-declaration and default args.


Is this supposed to compile, or should I create a PR?

I stumbled upon this when trying out boost::lambda with gcc 3.4.


#include <vector>

namespace std {

template <class T1, class T2> class vector;

}

class Foo {};
typedef std::vector<Foo> FooVec;


g++ -I../boost -O2 -c -o lambda.o lambda.C
lambda.C:10: error: wrong number of template arguments (1, should be 2)
lambda.C:5: error: provided for `template<class T1, class T2> struct std::vector'
lambda.C:10: error: ISO C++ forbids declaration of `FooVec' with no type

g++ --version
g++ (GCC) 3.4.0 20040105 (experimental)

-- 
	Lgb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]