Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/concept_check.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
29 # include <boost/detail/workaround.hpp> | 29 # include <boost/detail/workaround.hpp> |
30 # include <boost/detail/iterator.hpp> | 30 # include <boost/detail/iterator.hpp> |
31 | 31 |
32 # include <boost/concept/usage.hpp> | 32 # include <boost/concept/usage.hpp> |
33 # include <boost/concept/detail/concept_def.hpp> | 33 # include <boost/concept/detail/concept_def.hpp> |
34 | |
35 #if (defined _MSC_VER) | |
36 # pragma warning( push ) | |
37 # pragma warning( disable : 4510 ) // default constructor could not be generated | |
38 # pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required | |
39 #endif | |
34 | 40 |
35 namespace boost | 41 namespace boost |
36 { | 42 { |
37 | 43 |
38 // | 44 // |
173 ignore_unused_variable_warning(ptr); | 179 ignore_unused_variable_warning(ptr); |
174 } | 180 } |
175 TT b; | 181 TT b; |
176 }; | 182 }; |
177 | 183 |
178 #if (defined _MSC_VER) | |
179 # pragma warning( push ) | |
180 # pragma warning( disable : 4510 ) // default constructor could not be generated | |
181 # pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required | |
182 #endif | |
183 // The SGI STL version of Assignable requires copy constructor and operator= | 184 // The SGI STL version of Assignable requires copy constructor and operator= |
184 BOOST_concept(SGIAssignable,(TT)) | 185 BOOST_concept(SGIAssignable,(TT)) |
185 { | 186 { |
186 BOOST_CONCEPT_USAGE(SGIAssignable) { | 187 BOOST_CONCEPT_USAGE(SGIAssignable) { |
187 TT c(a); | 188 TT c(a); |
200 ignore_unused_variable_warning(c); | 201 ignore_unused_variable_warning(c); |
201 } | 202 } |
202 TT a; | 203 TT a; |
203 TT b; | 204 TT b; |
204 }; | 205 }; |
205 #if (defined _MSC_VER) | |
206 # pragma warning( pop ) | |
207 #endif | |
208 | 206 |
209 BOOST_concept(Convertible,(X)(Y)) | 207 BOOST_concept(Convertible,(X)(Y)) |
210 { | 208 { |
211 BOOST_CONCEPT_USAGE(Convertible) { | 209 BOOST_CONCEPT_USAGE(Convertible) { |
212 Y y = x; | 210 Y y = x; |
560 | 558 |
561 BOOST_concept(Mutable_ForwardIterator,(TT)) | 559 BOOST_concept(Mutable_ForwardIterator,(TT)) |
562 : ForwardIterator<TT> | 560 : ForwardIterator<TT> |
563 { | 561 { |
564 BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { | 562 BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { |
565 *i++ = *i; // require postincrement and assignment | 563 *i++ = *j; // require postincrement and assignment |
566 } | 564 } |
567 private: | 565 private: |
568 TT i; | 566 TT i, j; |
569 }; | 567 }; |
570 | 568 |
571 BOOST_concept(BidirectionalIterator,(TT)) | 569 BOOST_concept(BidirectionalIterator,(TT)) |
572 : ForwardIterator<TT> | 570 : ForwardIterator<TT> |
573 { | 571 { |
589 : BidirectionalIterator<TT> | 587 : BidirectionalIterator<TT> |
590 , Mutable_ForwardIterator<TT> | 588 , Mutable_ForwardIterator<TT> |
591 { | 589 { |
592 BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) | 590 BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) |
593 { | 591 { |
594 *i-- = *i; // require postdecrement and assignment | 592 *i-- = *j; // require postdecrement and assignment |
595 } | 593 } |
596 private: | 594 private: |
597 TT i; | 595 TT i, j; |
598 }; | 596 }; |
599 | 597 |
600 BOOST_concept(RandomAccessIterator,(TT)) | 598 BOOST_concept(RandomAccessIterator,(TT)) |
601 : BidirectionalIterator<TT> | 599 : BidirectionalIterator<TT> |
602 , Comparable<TT> | 600 , Comparable<TT> |
818 , DefaultConstructible<S> | 816 , DefaultConstructible<S> |
819 { | 817 { |
820 BOOST_CONCEPT_USAGE(Sequence) | 818 BOOST_CONCEPT_USAGE(Sequence) |
821 { | 819 { |
822 S | 820 S |
823 c(n), | 821 c(n, t), |
824 c2(n, t), | 822 c2(first, last); |
825 c3(first, last); | |
826 | 823 |
827 c.insert(p, t); | 824 c.insert(p, t); |
828 c.insert(p, n, t); | 825 c.insert(p, n, t); |
829 c.insert(p, first, last); | 826 c.insert(p, first, last); |
830 | 827 |
833 | 830 |
834 typename Sequence::reference r = c.front(); | 831 typename Sequence::reference r = c.front(); |
835 | 832 |
836 ignore_unused_variable_warning(c); | 833 ignore_unused_variable_warning(c); |
837 ignore_unused_variable_warning(c2); | 834 ignore_unused_variable_warning(c2); |
838 ignore_unused_variable_warning(c3); | |
839 ignore_unused_variable_warning(r); | 835 ignore_unused_variable_warning(r); |
840 const_constraints(c); | 836 const_constraints(c); |
841 } | 837 } |
842 private: | 838 private: |
843 void const_constraints(const S& c) { | 839 void const_constraints(const S& c) { |
878 private: | 874 private: |
879 void const_constraints(const S& cc) { | 875 void const_constraints(const S& cc) { |
880 typename BackInsertionSequence::const_reference | 876 typename BackInsertionSequence::const_reference |
881 r = cc.back(); | 877 r = cc.back(); |
882 ignore_unused_variable_warning(r); | 878 ignore_unused_variable_warning(r); |
883 }; | 879 } |
884 S c; | 880 S c; |
885 typename S::value_type t; | 881 typename S::value_type t; |
886 }; | 882 }; |
887 | 883 |
888 BOOST_concept(AssociativeContainer,(C)) | 884 BOOST_concept(AssociativeContainer,(C)) |
1075 const_iterator ci; | 1071 const_iterator ci; |
1076 size_type n; | 1072 size_type n; |
1077 }; | 1073 }; |
1078 } // namespace boost | 1074 } // namespace boost |
1079 | 1075 |
1076 #if (defined _MSC_VER) | |
1077 # pragma warning( pop ) | |
1078 #endif | |
1079 | |
1080 # include <boost/concept/detail/concept_undef.hpp> | 1080 # include <boost/concept/detail/concept_undef.hpp> |
1081 | 1081 |
1082 #endif // BOOST_CONCEPT_CHECKS_HPP | 1082 #endif // BOOST_CONCEPT_CHECKS_HPP |
1083 | 1083 |