libstdc++: Skip container adaptor tests that fail concept checks
As an extension, our container adaptors SFINAE away the default constructor if the adapted sequence container is not default constructible. When _GLIBCXX_CONCEPT_CHECKS is defined we enforce that the sequence is default constructible, so the tests for the extension fail. This disables the relevant parts of the tests. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1.cc: Do not check non-default constructible sequences when _GLIBCXX_CONCEPT_CHECKS is defined. * testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1_c++98.cc: Likewise. * testsuite/23_containers/queue/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/23_containers/queue/requirements/explicit_instantiation/1_c++98.cc: Likewise. * testsuite/23_containers/stack/requirements/explicit_instantiation/1.cc: Likewise. * testsuite/23_containers/stack/requirements/explicit_instantiation/1_c++98.cc: Likewise.
This commit is contained in:
parent
b701f46ea6
commit
07fbdd7bda
6 changed files with 22 additions and 8 deletions
|
@ -24,12 +24,15 @@
|
|||
|
||||
template class std::priority_queue<int>;
|
||||
|
||||
struct NonDefaultConstructible : std::vector<int> {
|
||||
NonDefaultConstructible(int) { }
|
||||
};
|
||||
struct Cmp : std::less<int> {
|
||||
Cmp(int) { }
|
||||
};
|
||||
template class std::priority_queue<int, std::vector<int>, Cmp>;
|
||||
|
||||
#ifndef _GLIBCXX_CONCEPT_CHECKS
|
||||
struct NonDefaultConstructible : std::vector<int> {
|
||||
NonDefaultConstructible(int) { }
|
||||
};
|
||||
template class std::priority_queue<int, NonDefaultConstructible>;
|
||||
template class std::priority_queue<int, NonDefaultConstructible, Cmp>;
|
||||
template class std::priority_queue<int, std::vector<int>, Cmp>;
|
||||
#endif
|
||||
|
|
|
@ -24,12 +24,15 @@
|
|||
|
||||
template class std::priority_queue<int>;
|
||||
|
||||
struct NonDefaultConstructible : std::vector<int> {
|
||||
NonDefaultConstructible(int) { }
|
||||
};
|
||||
struct Cmp : std::less<int> {
|
||||
Cmp(int) { }
|
||||
};
|
||||
template class std::priority_queue<int, std::vector<int>, Cmp>;
|
||||
|
||||
#ifndef _GLIBCXX_CONCEPT_CHECKS
|
||||
struct NonDefaultConstructible : std::vector<int> {
|
||||
NonDefaultConstructible(int) { }
|
||||
};
|
||||
template class std::priority_queue<int, NonDefaultConstructible>;
|
||||
template class std::priority_queue<int, NonDefaultConstructible, Cmp>;
|
||||
template class std::priority_queue<int, std::vector<int>, Cmp>;
|
||||
#endif
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
|
||||
template class std::queue<int>;
|
||||
|
||||
#ifndef _GLIBCXX_CONCEPT_CHECKS
|
||||
struct NonDefaultConstructible : std::deque<int> {
|
||||
NonDefaultConstructible(int) { }
|
||||
};
|
||||
template class std::queue<int, NonDefaultConstructible>;
|
||||
#endif
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
|
||||
template class std::queue<int>;
|
||||
|
||||
#ifndef _GLIBCXX_CONCEPT_CHECKS
|
||||
struct NonDefaultConstructible : std::deque<int> {
|
||||
NonDefaultConstructible(int) { }
|
||||
};
|
||||
template class std::queue<int, NonDefaultConstructible>;
|
||||
#endif
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
|
||||
template class std::stack<int>;
|
||||
|
||||
#ifndef _GLIBCXX_CONCEPT_CHECKS
|
||||
struct NonDefaultConstructible : std::deque<int> {
|
||||
NonDefaultConstructible(int) { }
|
||||
};
|
||||
template class std::stack<int, NonDefaultConstructible>;
|
||||
#endif
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
|
||||
template class std::stack<int>;
|
||||
|
||||
#ifndef _GLIBCXX_CONCEPT_CHECKS
|
||||
struct NonDefaultConstructible : std::deque<int> {
|
||||
NonDefaultConstructible(int) { }
|
||||
};
|
||||
template class std::stack<int, NonDefaultConstructible>;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue