[Bug c++/21244] Confusion in template instantiation

dominik dot strasser at infineon dot com gcc-bugzilla@gcc.gnu.org
Wed Apr 27 06:55:00 GMT 2005


------- Additional Comments From dominik dot strasser at infineon dot com  2005-04-27 06:55 -------
Created an attachment (id=8748)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8748&action=view)
Another source illustrating the problem.

Error messages:
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:
In member function ‘void std::vector<bool, _Alloc>::_M_initialize(size_t)
[with _Alloc = std::allocator<bool>]’:
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:642:
  instantiated from ‘std::vector<bool, _Alloc>::vector(size_t) [with
_Alloc = std::allocator<bool>]’
gcc4_template1.C:14:   instantiated from here
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:454:
error: ‘std::<anonymous enum>’ is/uses anonymous type
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:454:
error:	 trying to instantiate ‘template<class T> Foo operator/(const
Foo&, T)’
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:
In member function ‘std::_Bit_type*
std::_Bvector_base<_Alloc>::_M_allocate(size_t) [with _Alloc =
std::allocator<bool>]’:
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:453:
  instantiated from ‘void std::vector<bool,
_Alloc>::_M_initialize(size_t) [with _Alloc = std::allocator<bool>]’
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:642:
  instantiated from ‘std::vector<bool, _Alloc>::vector(size_t) [with
_Alloc = std::allocator<bool>]’
gcc4_template1.C:14:   instantiated from here
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:387:
error: ‘std::<anonymous enum>’ is/uses anonymous type
/data/heizer1_0/strassed/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_bvector.h:387:
error:	 trying to instantiate ‘template<class T> Foo operator/(const
Foo&, T)’


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21244



More information about the Gcc-bugs mailing list