internal compiler error with template template paramaters (fwd)
Siemel B. Naran
sbnaran@physics.uiuc.edu
Fri Feb 25 09:49:00 GMT 2000
--
----------------------------------
Siemel B. Naran (sbnaran@uiuc.edu)
----------------------------------
---------- Forwarded message ----------
Date: Fri, 25 Feb 2000 09:16:32 -0800 (PST)
From: daemon@cygnus.com
To: sbnaran@uiuc.edu
Subject: Re: internal compiler error with template template paramaters
Sorry, I am unable to deliver your mail note to egcs-bugs@cygnus.com,
that list name is no longer used. Please try resending your mail
note to the new list name: egcs-bugs@egcs.cygnus.com.
If you have any questions about this, send mail to sourcemaster@cygnus.com.
This is a machine-generated message.
Here is a copy of the note you sent.
-----------------------------------------------------------------------------
#include <string>
#include <vector>
template <template <class T> class Container>
inline
std::string combine(const Container<std::string>& c)
{
//#define Container std::vector
typedef typename Container<std::string>::const_iterator Iter;
// this line should be ok
// but egcs hates it
//#undef Container
Iter iter=c.begin();
const Iter end=c.end();
std::string out;
for ( ; iter!=end; ++iter) { out+=*iter; out+=' '; }
return out;
}
void test_combine()
{
cout << "\ntest_combine\n";
std::vector<std::string> c;
c.push_back("hello");
c.push_back("world");
cout << "c[0]=" << c[0] << '\n';
cout << "c[1]=" << c[1] << '\n';
const std::string result=combine(c);
cout << "result=" << result << '\n';
cout << endl;
}
More information about the Gcc-bugs
mailing list