This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc-2.97 20010109: gcc assumes default argument in constructor where it's not specified
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc-2.97 20010109: gcc assumes default argument in constructor where it's not specified
- From: Andris Pavenis <pavenis at latnet dot lv>
- Date: Wed, 10 Jan 2001 12:08:06 +0200
In following example (see attached precompiled source) gcc-2.97 20010109 I'm getting
following compiler errors:
lasdata/amu_cal.cc: In constructor `AmuCalibr::AmuCalibr(const string&,
double)':
lasdata/amu_cal.cc:63: call of overloaded `vector()' is ambiguous
/disk2/gcctest/include/g++-v3/bits/stl_vector.h:252: candidates are:
std::vector<_Tp, _Alloc>::vector(unsigned int = 0) [with _Tp = AmuMeasPoint,
_Alloc = std::allocator<AmuMeasPoint>]
/disk2/gcctest/include/g++-v3/bits/stl_vector.h:244:
std::vector<_Tp, _Alloc>::vector(typename std::_Vector_base<_Tp,
_Alloc>::allocator_type& = typename std::_Vector_base<_Tp,
_Alloc>::allocator_type()) [with _Tp = AmuMeasPoint, _Alloc =
std::allocator<AmuMeasPoint>]
At line 252 in bits/stl_vector I have
explicit vector(size_type __n)
: _Base(__n, allocator_type())
{ _M_finish = uninitialized_fill_n(_M_start, __n, _Tp()); }
So no default argument in this constructor and as result there should be no
ambiguity. I failed to reproduce this problem in smaller example so I'm including
full preprocessed source (sorry for size)
Andris
amu_cal.ii.bz2