DR 438, [DR].

2007-04-27  Paolo Carlini  <pcarlini@suse.de>

	DR 438, [DR].
	* include/bits/basic_string.h (_S_construct_aux(_InIterator,
	_InIterator, const _Alloc&, __true_type)): Do not cast the
	second argument.
	* include/ext/rc_string_base.h (_S_construct_aux(_Integer,
	_Integer, const _Alloc&, std::__true_type)): Likewise.
	* include/ext/sso_string_base.h (_M_construct_aux(_InIterator,
	_InIterator, std::__true_type)): Likewise.
	* include/bits/stl_deque.h (_M_initialize_dispatch(_Integer,
	_Integer, __true_type)): Cast the first argument.
	(_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
	not cast the arguments.
	(_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
	Likewise.
	* include/bits/stl_list.h (_M_initialize_dispatch(_Integer,
	_Integer, __true_type)): Likewise.
	(_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
	not cast both arguments.
	* include/bits/stl_bvector.h (_M_initialize_dispatch(_Integer,
	_Integer, __true_type)): Cast the first argument.
	(_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
	cast the arguments.
	* include/bits/stl_vector.h (_M_initialize_dispatch(_Integer,
	_Integer, __true_type)): Cast the first argument.
	(_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
	cast the arguments.
	(_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
	Likewise.
	* testsuite/21_strings/basic_string/requirements/dr438/
	constructor.cc: New.
	* testsuite/ext/vstring/requirements/dr438/constructor.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/deque/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/deque/
	constructor.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/deque/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/deque/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/deque/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/list/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/list/
	constructor.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/list/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/list/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/list/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/vector/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/vector/
	constructor.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/vector/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/vector/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/vector/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/requirements/sequences/dr438/vector/
	bool/constructor.cc: Likewise.
	* docs/html/ext/howto.html: Add an entry for DR 438.

From-SVN: r124243
This commit is contained in:
Paolo Carlini 2007-04-27 22:59:36 +00:00 committed by Paolo Carlini
parent 113ab41c05
commit 25959e29ee
27 changed files with 710 additions and 46 deletions

View File

@ -1,3 +1,70 @@
2007-04-27 Paolo Carlini <pcarlini@suse.de>
DR 438, [DR].
* include/bits/basic_string.h (_S_construct_aux(_InIterator,
_InIterator, const _Alloc&, __true_type)): Do not cast the
second argument.
* include/ext/rc_string_base.h (_S_construct_aux(_Integer,
_Integer, const _Alloc&, std::__true_type)): Likewise.
* include/ext/sso_string_base.h (_M_construct_aux(_InIterator,
_InIterator, std::__true_type)): Likewise.
* include/bits/stl_deque.h (_M_initialize_dispatch(_Integer,
_Integer, __true_type)): Cast the first argument.
(_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
not cast the arguments.
(_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
Likewise.
* include/bits/stl_list.h (_M_initialize_dispatch(_Integer,
_Integer, __true_type)): Likewise.
(_M_assign_dispatch(_Integer, _Integer, __true_type)): Do
not cast both arguments.
* include/bits/stl_bvector.h (_M_initialize_dispatch(_Integer,
_Integer, __true_type)): Cast the first argument.
(_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
cast the arguments.
* include/bits/stl_vector.h (_M_initialize_dispatch(_Integer,
_Integer, __true_type)): Cast the first argument.
(_M_assign_dispatch(_Integer, _Integer, __true_type)): Do not
cast the arguments.
(_M_insert_dispatch(iterator, _Integer, _Integer, __true_type)):
Likewise.
* testsuite/21_strings/basic_string/requirements/dr438/
constructor.cc: New.
* testsuite/ext/vstring/requirements/dr438/constructor.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/deque/
assign_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/deque/
constructor.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/deque/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/deque/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/deque/
insert_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/list/
assign_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/list/
constructor.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/list/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/list/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/list/
insert_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/vector/
assign_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/vector/
constructor.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/vector/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/vector/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/vector/
insert_neg.cc: Likewise.
* testsuite/23_containers/requirements/sequences/dr438/vector/
bool/constructor.cc: Likewise.
* docs/html/ext/howto.html: Add an entry for DR 438.
2007-04-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_classes.h: Remove redundant inline specifiers.

View File

@ -543,7 +543,7 @@
</dd>
<dt><a href="lwg-defects.html#432">432</a>:
<em>432. stringbuf::overflow() makes only one write position
<em>stringbuf::overflow() makes only one write position
available</em>
</dt>
<dd>Implement the resolution, beyond DR 169.
@ -555,6 +555,12 @@
<dd>Add three overloads, taking fewer template arguments.
</dd>
<dt><a href="lwg-defects.html#438">438</a>:
<em>Ambiguity in the "do the right thing" clause</em>
</dt>
<dd>Implement the resolution, basically cast less.
</dd>
<dt><a href="lwg-defects.html#453">453</a>:
<em>basic_stringbuf::seekoff need not always fail for an empty stream</em>
</dt>

View File

@ -1467,12 +1467,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return _S_construct(__beg, __end, __a, _Tag());
}
template<class _InIterator>
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<class _Integer>
static _CharT*
_S_construct_aux(_InIterator __beg, _InIterator __end,
_S_construct_aux(_Integer __beg, _Integer __end,
const _Alloc& __a, __true_type)
{ return _S_construct(static_cast<size_type>(__beg),
static_cast<value_type>(__end), __a); }
{ return _S_construct(static_cast<size_type>(__beg), __end, __a); }
template<class _InIterator>
static _CharT*

View File

@ -793,11 +793,14 @@ template<typename _Alloc>
}
// Check whether it's an integral type. If so, it's not an iterator.
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
{
_M_initialize(__n);
_M_initialize(static_cast<size_type>(__n));
std::fill(this->_M_impl._M_start._M_p,
this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
}
@ -828,10 +831,12 @@ template<typename _Alloc>
std::copy(__first, __last, this->_M_impl._M_start);
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{ _M_fill_assign((size_t) __n, (bool) __val); }
{ _M_fill_assign(__n, __val); }
template<class _InputIterator>
void
@ -888,6 +893,9 @@ template<typename _Alloc>
}
// Check whether it's an integral type. If so, it's not an iterator.
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,

View File

@ -1221,11 +1221,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal constructor functions follow.
// called by the range constructor to implement [23.1.1]/9
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
{
_M_initialize_map(__n);
_M_initialize_map(static_cast<size_type>(__n));
_M_fill_initialize(__x);
}
@ -1285,13 +1288,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// assignment work for the range versions.
// called by the range assign to implement [23.1.1]/9
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{
_M_fill_assign(static_cast<size_type>(__n),
static_cast<value_type>(__val));
}
{ _M_fill_assign(__n, __val); }
// called by the range assign to implement [23.1.1]/9
template<typename _InputIterator>
@ -1364,14 +1367,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// insertion work when all shortcuts fail.
// called by the range insert to implement [23.1.1]/9
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos,
_Integer __n, _Integer __x, __true_type)
{
_M_fill_insert(__pos, static_cast<size_type>(__n),
static_cast<value_type>(__x));
}
{ _M_fill_insert(__pos, __n, __x); }
// called by the range insert to implement [23.1.1]/9
template<typename _InputIterator>

View File

@ -1,6 +1,6 @@
// List implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@ -1098,13 +1098,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal constructor functions follow.
// Called by the range constructor to implement [23.1.1]/9
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
{
_M_fill_initialize(static_cast<size_type>(__n),
static_cast<value_type>(__x));
}
{ _M_fill_initialize(static_cast<size_type>(__n), __x); }
// Called by the range constructor to implement [23.1.1]/9
template<typename _InputIterator>
@ -1129,13 +1129,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal assign functions follow.
// Called by the range assign to implement [23.1.1]/9
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{
_M_fill_assign(static_cast<size_type>(__n),
static_cast<value_type>(__val));
}
{ _M_fill_assign(__n, __val); }
// Called by the range assign to implement [23.1.1]/9
template<typename _InputIterator>

View File

@ -1,6 +1,6 @@
// Vector implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@ -778,13 +778,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal constructor functions follow.
// Called by the range constructor to implement [23.1.1]/9
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
{
this->_M_impl._M_start = _M_allocate(__n);
this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
this->_M_impl._M_start = _M_allocate(static_cast<size_type>(__n));
this->_M_impl._M_end_of_storage =
this->_M_impl._M_start + static_cast<size_type>(__n);
std::__uninitialized_fill_n_a(this->_M_impl._M_start,
static_cast<size_type>(__n),
__value,
_M_get_Tp_allocator());
this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
}
@ -830,13 +836,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// assignment work for the range versions.
// Called by the range assign to implement [23.1.1]/9
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
{
_M_fill_assign(static_cast<size_type>(__n),
static_cast<value_type>(__val));
}
{ _M_fill_assign(__n, __val); }
// Called by the range assign to implement [23.1.1]/9
template<typename _InputIterator>
@ -870,14 +876,14 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
// Internal insert functions follow.
// Called by the range insert to implement [23.1.1]/9
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
__true_type)
{
_M_fill_insert(__pos, static_cast<size_type>(__n),
static_cast<value_type>(__val));
}
{ _M_fill_insert(__pos, __n, __val); }
// Called by the range insert to implement [23.1.1]/9
template<typename _InputIterator>

View File

@ -231,12 +231,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return _S_construct(__beg, __end, __a, _Tag());
}
template<typename _InIterator>
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
static _CharT*
_S_construct_aux(_InIterator __beg, _InIterator __end,
_S_construct_aux(_Integer __beg, _Integer __end,
const _Alloc& __a, std::__true_type)
{ return _S_construct(static_cast<size_type>(__beg),
static_cast<value_type>(__end), __a); }
{ return _S_construct(static_cast<size_type>(__beg), __end, __a); }
template<typename _InIterator>
static _CharT*

View File

@ -106,12 +106,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_M_construct(__beg, __end, _Tag());
}
template<typename _InIterator>
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 438. Ambiguity in the "do the right thing" clause
template<typename _Integer>
void
_M_construct_aux(_InIterator __beg, _InIterator __end,
std::__true_type)
{ _M_construct(static_cast<size_type>(__beg),
static_cast<value_type>(__end)); }
_M_construct_aux(_Integer __beg, _Integer __end, std::__true_type)
{ _M_construct(static_cast<size_type>(__beg), __end); }
template<typename _InIterator>
void

View File

@ -0,0 +1,28 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
#include <string>
void f()
{
std::string s(10, 1);
}

View File

@ -0,0 +1,36 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1297 }
// { dg-excess-errors "" }
#include <deque>
struct A
{
explicit A(int) { }
};
void f()
{
std::deque<A> d;
d.assign(10, 1);
}

View File

@ -0,0 +1,28 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
#include <deque>
void f()
{
std::deque<int> v(10, 1);
}

View File

@ -0,0 +1,30 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1232 }
// { dg-excess-errors "" }
#include <deque>
void f()
{
std::deque<std::deque<int> > d(10, 1);
}

View File

@ -0,0 +1,31 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1232 }
// { dg-excess-errors "" }
#include <deque>
#include <utility>
void f()
{
std::deque<std::deque<std::pair<char, char> > > d('a', 'b');
}

View File

@ -0,0 +1,37 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1377 }
// { dg-excess-errors "" }
#include <deque>
struct A
{
explicit A(int) { }
};
void f()
{
std::deque<A> d;
d.insert(d.begin(), 10, 1);
}

View File

@ -0,0 +1,36 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1138 }
// { dg-excess-errors "" }
#include <list>
struct A
{
explicit A(int) { }
};
void f()
{
std::list<A> l;
l.assign(10, 1);
}

View File

@ -0,0 +1,28 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
#include <list>
void f()
{
std::list<int> l(10, 1);
}

View File

@ -0,0 +1,30 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1107 }
// { dg-excess-errors "" }
#include <list>
void f()
{
std::list<std::list<int> > l(10, 1);
}

View File

@ -0,0 +1,31 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1107 }
// { dg-excess-errors "" }
#include <list>
#include <utility>
void f()
{
std::list<std::list<std::pair<char, char> > > l('a', 'b');
}

View File

@ -0,0 +1,36 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 1107 }
// { dg-excess-errors "" }
#include <list>
struct A
{
explicit A(int) { }
};
void f()
{
std::list<A> l;
l.insert(l.begin(), 10, 1);
}

View File

@ -0,0 +1,36 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 845 }
// { dg-excess-errors "" }
#include <vector>
struct A
{
explicit A(int) { }
};
void f()
{
std::vector<A> v;
v.assign(10, 1);
}

View File

@ -0,0 +1,28 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
#include <vector>
void f()
{
std::vector<bool> vb(10, 1);
}

View File

@ -0,0 +1,28 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
#include <vector>
void f()
{
std::vector<int> v(10, 1);
}

View File

@ -0,0 +1,30 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no match" "" { target *-*-* } 706 }
// { dg-excess-errors "" }
#include <vector>
void f()
{
std::vector<std::vector<int> > v(10, 1);
}

View File

@ -0,0 +1,31 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no match" "" { target *-*-* } 706 }
// { dg-excess-errors "" }
#include <vector>
#include <utility>
void f()
{
std::vector<std::vector<std::pair<char, char> > > v('a', 'b');
}

View File

@ -0,0 +1,36 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
// { dg-error "no matching" "" { target *-*-* } 886 }
// { dg-excess-errors "" }
#include <vector>
struct A
{
explicit A(int) { }
};
void f()
{
std::vector<A> v;
v.insert(v.begin(), 10, 1);
}

View File

@ -0,0 +1,32 @@
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
// Copyright (C) 2007 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// { dg-do compile }
#include <ext/vstring.h>
void f()
{
__gnu_cxx::__versa_string<char, std::char_traits<char>,
std::allocator<char>, __gnu_cxx::__sso_string_base> vs(10, 1);
__gnu_cxx::__versa_string<char, std::char_traits<char>,
std::allocator<char>, __gnu_cxx::__rc_string_base> vr(10, 1);
}