This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Strange behavior
- To: egcs-bugs at cygnus dot com
- Subject: Strange behavior
- From: Jimen Ching <jching at flex dot com>
- Date: Sat, 28 Feb 1998 11:14:29 -1000 (HST)
Hi,
I get the following behavior. Is there something wrong with the
code or with g++? Note, I didn't get a warning about using typename.
--jc
------------------------------------
~/src/bug% /usr/local/bin/g++ -pedantic bug9.cc
bug9.cc: In method `my_class<T>::my_class()':
bug9.cc:13: parse error before `='
[core:ttyp2]
~/src/bug% /usr/local/bin/g++ bug9.cc
bug9.cc:13: `__eq<>' does not match any template declaration
bug9.cc:13: confused by earlier errors, bailing out
-------------------------
#include <list>
template<class T>
class my_class
{
public:
typedef T value_type;
typedef list<value_type> list_type;
my_class()
{
list_type::const_iterator idx = _my_list.begin();
}
~my_class()
{}
private:
list_type _my_list;
};
--
Jimen Ching (WH6BRR) jching@flex.com wh6brr@uhm.ampr.org