some concept checking changes as per review comments

[SVN r8268]
This commit is contained in:
Jeremy Siek committed 2000-11-20 18:17:52 +00:00
1 parent 6e6ebd28d6
commit 86b1612338
15 files changed
+711 -277

No files matched your search

+35 -24
View File
@@ -4,6 +4,15 @@
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
//
// This file checks to see if various standard container
// implementations live up to requirements specified in the C++
// standard. As many implementations do not live to the requirements,
// it is not uncommon for this file to fail to compile. The
// BOOST_HIDE_EXPECTED_ERRORS macro is provided here if you want to
// see as much of this file compile as possible.
//
#include <boost/pending/concept_checks.hpp>
#include <iterator>
@@ -16,10 +25,12 @@
#include <slist>
#endif
//#define BOOST_HIDE_EXPECTED_ERRORS
int
main()
{
#if defined(_ITERATOR_)
#if defined(_ITERATOR_) && defined(BOOST_HIDE_EXPECTED_ERRORS)
// VC++ STL implementation is not standard conformant and
// fails to pass these concept checks
#else
@@ -28,27 +39,27 @@ main()
typedef std::list<int> List;
// VC++ missing pointer and const_pointer typedefs
REQUIRE(Vector, Mutable_RandomAccessContainer);
REQUIRE(Vector, BackInsertionSequence);
BOOST_FUNCTION_REQUIRES(Vector, Mutable_RandomAccessContainerConcept);
BOOST_FUNCTION_REQUIRES(Vector, BackInsertionSequenceConcept);
#if !defined(__GNUC__)
#if !defined __sgi
#if !(defined(__GNUC__) && defined(BOOST_HIDE_EXPECTED_ERRORS))
#if !(defined(__sgi) && defined(BOOST_HIDE_EXPECTED_ERRORS))
// old deque iterator missing n + iter operation
REQUIRE(Deque, Mutable_RandomAccessContainer);
BOOST_FUNCTION_REQUIRES(Deque, Mutable_RandomAccessContainerConcept);
#endif
// warnings about signed and unsigned in old deque version
REQUIRE(Deque, FrontInsertionSequence);
REQUIRE(Deque, BackInsertionSequence);
BOOST_FUNCTION_REQUIRES(Deque, FrontInsertionSequenceConcept);
BOOST_FUNCTION_REQUIRES(Deque, BackInsertionSequenceConcept);
#endif
// VC++ missing pointer and const_pointer typedefs
REQUIRE(List, Mutable_ReversibleContainer);
REQUIRE(List, FrontInsertionSequence);
REQUIRE(List, BackInsertionSequence);
BOOST_FUNCTION_REQUIRES(List, Mutable_ReversibleContainerConcept);
BOOST_FUNCTION_REQUIRES(List, FrontInsertionSequenceConcept);
BOOST_FUNCTION_REQUIRES(List, BackInsertionSequenceConcept);
#ifndef BOOST_NO_SLIST
typedef std::slist<int> SList;
REQUIRE(SList, FrontInsertionSequence);
BOOST_FUNCTION_REQUIRES(SList, FrontInsertionSequenceConcept);
#endif
typedef std::set<int> Set;
@@ -56,21 +67,21 @@ main()
typedef std::map<int,int> Map;
typedef std::multimap<int,int> MultiMap;
REQUIRE(Set, SortedAssociativeContainer);
REQUIRE(Set, SimpleAssociativeContainer);
REQUIRE(Set, UniqueAssociativeContainer);
BOOST_FUNCTION_REQUIRES(Set, SortedAssociativeContainerConcept);
BOOST_FUNCTION_REQUIRES(Set, SimpleAssociativeContainerConcept);
BOOST_FUNCTION_REQUIRES(Set, UniqueAssociativeContainerConcept);
REQUIRE(MultiSet, SortedAssociativeContainer);
REQUIRE(MultiSet, SimpleAssociativeContainer);
REQUIRE(MultiSet, MultipleAssociativeContainer);
BOOST_FUNCTION_REQUIRES(MultiSet, SortedAssociativeContainerConcept);
BOOST_FUNCTION_REQUIRES(MultiSet, SimpleAssociativeContainerConcept);
BOOST_FUNCTION_REQUIRES(MultiSet, MultipleAssociativeContainerConcept);
REQUIRE(Map, SortedAssociativeContainer);
REQUIRE(Map, UniqueAssociativeContainer);
REQUIRE(Map, PairAssociativeContainer);
BOOST_FUNCTION_REQUIRES(Map, SortedAssociativeContainerConcept);
BOOST_FUNCTION_REQUIRES(Map, UniqueAssociativeContainerConcept);
BOOST_FUNCTION_REQUIRES(Map, PairAssociativeContainerConcept);
REQUIRE(MultiMap, SortedAssociativeContainer);
REQUIRE(MultiMap, MultipleAssociativeContainer);
REQUIRE(MultiMap, PairAssociativeContainer);
BOOST_FUNCTION_REQUIRES(MultiMap, SortedAssociativeContainerConcept);
BOOST_FUNCTION_REQUIRES(MultiMap, MultipleAssociativeContainerConcept);
BOOST_FUNCTION_REQUIRES(MultiMap, PairAssociativeContainerConcept);
#endif
return 0;