Fix tests that fail without PCH
The recent change to stop transitively including <string> broke some tests, but only when the library is configured without PCH, because otherwise the <string> header still gets included via the precompiled <bits/stdc++.h> header. * testsuite/20_util/bad_function_call/what.cc: Include <string> header for std::string. * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise. * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory> header for std::allocator. * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add using-declaration for std::size_t. * testsuite/23_containers/array/tuple_interface/tuple_size.cc: Likewise. * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for std::istream. * testsuite/23_containers/vector/cons/55977.cc: Likewise. * testsuite/experimental/map/erasure.cc: Include <string> for std::string. * testsuite/experimental/unordered_map/erasure.cc: Likewise. From-SVN: r272376
This commit is contained in:
parent
61efadedfd
commit
9a9c7a625d
|
@ -1,3 +1,21 @@
|
||||||
|
2019-06-17 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
* testsuite/20_util/bad_function_call/what.cc: Include <string> header
|
||||||
|
for std::string.
|
||||||
|
* testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
|
||||||
|
* testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
|
||||||
|
header for std::allocator.
|
||||||
|
* testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
|
||||||
|
using-declaration for std::size_t.
|
||||||
|
* testsuite/23_containers/array/tuple_interface/tuple_size.cc:
|
||||||
|
Likewise.
|
||||||
|
* testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
|
||||||
|
std::istream.
|
||||||
|
* testsuite/23_containers/vector/cons/55977.cc: Likewise.
|
||||||
|
* testsuite/experimental/map/erasure.cc: Include <string> for
|
||||||
|
std::string.
|
||||||
|
* testsuite/experimental/unordered_map/erasure.cc: Likewise.
|
||||||
|
|
||||||
2019-06-14 Jonathan Wakely <jwakely@redhat.com>
|
2019-06-14 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
* include/experimental/type_traits (experimental::nonesuch): Use
|
* include/experimental/type_traits (experimental::nonesuch): Use
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
// <http://www.gnu.org/licenses/>.
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <string>
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
|
// 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
|
|
||||||
struct A { };
|
struct A { };
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
// this test may begin to fail.
|
// this test may begin to fail.
|
||||||
|
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
#include <memory>
|
||||||
#include <experimental/any>
|
#include <experimental/any>
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ test01()
|
||||||
// This relies on the fact that <utility> includes <type_traits>:
|
// This relies on the fact that <utility> includes <type_traits>:
|
||||||
using std::is_same;
|
using std::is_same;
|
||||||
|
|
||||||
const size_t len = 3;
|
const std::size_t len = 3;
|
||||||
typedef array<int, len> array_type;
|
typedef array<int, len> array_type;
|
||||||
|
|
||||||
static_assert(is_same<tuple_element<0, array_type>::type, int>::value, "" );
|
static_assert(is_same<tuple_element<0, array_type>::type, int>::value, "" );
|
||||||
|
|
|
@ -26,6 +26,7 @@ test01()
|
||||||
{
|
{
|
||||||
using std::array;
|
using std::array;
|
||||||
using std::tuple_size;
|
using std::tuple_size;
|
||||||
|
using std::size_t;
|
||||||
// This relies on the fact that <utility> includes <type_traits>:
|
// This relies on the fact that <utility> includes <type_traits>:
|
||||||
using std::is_same;
|
using std::is_same;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <istream>
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct MyAllocator
|
struct MyAllocator
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <istream>
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct MyAllocator
|
struct MyAllocator
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
// <http://www.gnu.org/licenses/>.
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <experimental/map>
|
#include <experimental/map>
|
||||||
|
#include <string>
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
|
|
||||||
auto is_odd_pair = [](const std::pair<const int, std::string>& p)
|
auto is_odd_pair = [](const std::pair<const int, std::string>& p)
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
// <http://www.gnu.org/licenses/>.
|
// <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include <experimental/unordered_map>
|
#include <experimental/unordered_map>
|
||||||
|
#include <string>
|
||||||
#include <testsuite_hooks.h>
|
#include <testsuite_hooks.h>
|
||||||
|
|
||||||
auto is_odd_pair = [](const std::pair<const int, std::string>& p)
|
auto is_odd_pair = [](const std::pair<const int, std::string>& p)
|
||||||
|
|
Loading…
Reference in New Issue