00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
#ifndef _BOOST_CONCEPT_CHECK_H
00043
#define _BOOST_CONCEPT_CHECK_H 1
00044
00045
#pragma GCC system_header
00046
00047
#include <cstddef>
00048
#include <bits/stl_iterator_base_types.h>
00049
#include <utility>
00050
00051
namespace __gnu_cxx
00052 {
00053
00054
#define _IsUnused __attribute__ ((__unused__))
00055
00056
00057
00058
00059
template <
class _Concept>
00060
inline void __function_requires()
00061 {
00062 void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
00063 }
00064
00065
00066
00067
00068
void __error_type_must_be_an_integer_type();
00069
void __error_type_must_be_an_unsigned_integer_type();
00070
void __error_type_must_be_a_signed_integer_type();
00071
00072
00073
#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \
00074
typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \
00075
template <_func##_type_var##_concept _Tp1> \
00076
struct _concept_checking##_type_var##_concept { }; \
00077
typedef _concept_checking##_type_var##_concept< \
00078
&_ns::_concept <_type_var>::__constraints> \
00079
_concept_checking_typedef##_type_var##_concept
00080
00081
#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \
00082
typedef void (_ns::_concept <_type_var1,_type_var2>::* _func##_type_var1##_type_var2##_concept)(); \
00083
template <_func##_type_var1##_type_var2##_concept _Tp1> \
00084
struct _concept_checking##_type_var1##_type_var2##_concept { }; \
00085
typedef _concept_checking##_type_var1##_type_var2##_concept< \
00086
&_ns::_concept <_type_var1,_type_var2>::__constraints> \
00087
_concept_checking_typedef##_type_var1##_type_var2##_concept
00088
00089
#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \
00090
typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>::* _func##_type_var1##_type_var2##_type_var3##_concept)(); \
00091
template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \
00092
struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; \
00093
typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \
00094
&_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints> \
00095
_concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept
00096
00097
#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \
00098
typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \
00099
template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept _Tp1> \
00100
struct _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept { }; \
00101
typedef _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \
00102
&_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::__constraints> \
00103
_concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept
00104
00105
00106
template <
class _Tp1,
class _Tp2>
00107
struct _Aux_require_same { };
00108
00109
template <
class _Tp>
00110
struct _Aux_require_same<_Tp,_Tp> {
typedef _Tp _Type; };
00111
00112
template <
class _Tp1,
class _Tp2>
00113
struct _SameTypeConcept
00114 {
00115
void __constraints() {
00116
typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required;
00117 }
00118 };
00119
00120
template <
class _Tp>
00121
struct _IntegerConcept {
00122
void __constraints() {
00123 __error_type_must_be_an_integer_type();
00124 }
00125 };
00126
template <>
struct _IntegerConcept<short> {
void __constraints() {} };
00127
template <>
struct _IntegerConcept<unsigned short> {
void __constraints(){} };
00128
template <>
struct _IntegerConcept<int> {
void __constraints() {} };
00129
template <>
struct _IntegerConcept<unsigned int> {
void __constraints() {} };
00130
template <>
struct _IntegerConcept<long> {
void __constraints() {} };
00131
template <>
struct _IntegerConcept<unsigned long> {
void __constraints() {} };
00132
template <>
struct _IntegerConcept<long long> {
void __constraints() {} };
00133
template <>
struct _IntegerConcept<unsigned long long>
00134 {
void __constraints() {} };
00135
00136
template <
class _Tp>
00137
struct _SignedIntegerConcept {
00138
void __constraints() {
00139 __error_type_must_be_a_signed_integer_type();
00140 }
00141 };
00142
template <>
struct _SignedIntegerConcept<short> {
void __constraints() {} };
00143
template <>
struct _SignedIntegerConcept<int> {
void __constraints() {} };
00144
template <>
struct _SignedIntegerConcept<long> {
void __constraints() {} };
00145
template <>
struct _SignedIntegerConcept<long long> {
void __constraints(){}};
00146
00147
template <
class _Tp>
00148
struct _UnsignedIntegerConcept {
00149
void __constraints() {
00150 __error_type_must_be_an_unsigned_integer_type();
00151 }
00152 };
00153
template <>
struct _UnsignedIntegerConcept<unsigned short>
00154 {
void __constraints() {} };
00155
template <>
struct _UnsignedIntegerConcept<unsigned int>
00156 {
void __constraints() {} };
00157
template <>
struct _UnsignedIntegerConcept<unsigned long>
00158 {
void __constraints() {} };
00159
template <>
struct _UnsignedIntegerConcept<unsigned long long>
00160 {
void __constraints() {} };
00161
00162
00163
00164
00165
template <
class _Tp>
00166
struct _DefaultConstructibleConcept
00167 {
00168
void __constraints() {
00169 _Tp __a _IsUnused;
00170 }
00171 };
00172
00173
template <
class _Tp>
00174
struct _AssignableConcept
00175 {
00176
void __constraints() {
00177 __a = __a;
00178 __const_constraints(__a);
00179 }
00180
void __const_constraints(
const _Tp& __b) {
00181 __a = __b;
00182 }
00183 _Tp __a;
00184
00185
00186 };
00187
00188
template <
class _Tp>
00189
struct _CopyConstructibleConcept
00190 {
00191
void __constraints() {
00192 _Tp __a(__b);
00193 _Tp* __ptr _IsUnused = &__a;
00194 __const_constraints(__a);
00195 }
00196
void __const_constraints(
const _Tp& __a) {
00197 _Tp __c _IsUnused(__a);
00198
const _Tp* __ptr _IsUnused = &__a;
00199 }
00200 _Tp __b;
00201 };
00202
00203
00204
template <
class _Tp>
00205
struct _SGIAssignableConcept
00206 {
00207
void __constraints() {
00208 _Tp __b _IsUnused(__a);
00209 __a = __a;
00210 __const_constraints(__a);
00211 }
00212
void __const_constraints(
const _Tp& __b) {
00213 _Tp __c _IsUnused(__b);
00214 __a = __b;
00215 }
00216 _Tp __a;
00217 };
00218
00219
template <
class _From,
class _To>
00220
struct _ConvertibleConcept
00221 {
00222
void __constraints() {
00223 _To __y _IsUnused = __x;
00224 }
00225 _From __x;
00226 };
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
template <
class _Tp>
00238
void __aux_require_boolean_expr(
const _Tp& __t) {
00239
bool __x _IsUnused = __t;
00240 }
00241
00242
00243
template <
class _Tp>
00244
struct _EqualityComparableConcept
00245 {
00246
void __constraints() {
00247 __aux_require_boolean_expr(__a == __b);
00248 }
00249 _Tp __a, __b;
00250 };
00251
00252
template <
class _Tp>
00253
struct _LessThanComparableConcept
00254 {
00255
void __constraints() {
00256 __aux_require_boolean_expr(__a < __b);
00257 }
00258 _Tp __a, __b;
00259 };
00260
00261
00262
template <
class _Tp>
00263
struct _ComparableConcept
00264 {
00265
void __constraints() {
00266 __aux_require_boolean_expr(__a < __b);
00267 __aux_require_boolean_expr(__a > __b);
00268 __aux_require_boolean_expr(__a <= __b);
00269 __aux_require_boolean_expr(__a >= __b);
00270 }
00271 _Tp __a, __b;
00272 };
00273
00274
#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \
00275
template <class _First, class _Second> \
00276
struct _NAME { \
00277
void __constraints() { (void)__constraints_(); } \
00278
bool __constraints_() { \
00279
return __a _OP __b; \
00280
} \
00281
_First __a; \
00282
_Second __b; \
00283
}
00284
00285
#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \
00286
template <class _Ret, class _First, class _Second> \
00287
struct _NAME { \
00288
void __constraints() { (void)__constraints_(); } \
00289
_Ret __constraints_() { \
00290
return __a _OP __b; \
00291
} \
00292
_First __a; \
00293
_Second __b; \
00294
}
00295
00296 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept);
00297 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept);
00298 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept);
00299 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept);
00300 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept);
00301 _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept);
00302
00303 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept);
00304 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept);
00305 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept);
00306 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept);
00307 _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept);
00308
00309
#undef _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
00310
#undef _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT
00311
00312
00313
00314
00315
template <
class _Func,
class _Return>
00316
struct _GeneratorConcept
00317 {
00318
void __constraints() {
00319
const _Return& __r _IsUnused = __f();
00320 }
00321 _Func __f;
00322 };
00323
00324
00325
template <
class _Func>
00326
struct _GeneratorConcept<_Func,void>
00327 {
00328
void __constraints() {
00329 __f();
00330 }
00331 _Func __f;
00332 };
00333
00334
template <
class _Func,
class _Return,
class _Arg>
00335
struct _UnaryFunctionConcept
00336 {
00337
void __constraints() {
00338 __r = __f(__arg);
00339 }
00340 _Func __f;
00341 _Arg __arg;
00342 _Return __r;
00343 };
00344
00345
template <
class _Func,
class _Arg>
00346
struct _UnaryFunctionConcept<_Func, void, _Arg> {
00347
void __constraints() {
00348 __f(__arg);
00349 }
00350 _Func __f;
00351 _Arg __arg;
00352 };
00353
00354
template <
class _Func,
class _Return,
class _First,
class _Second>
00355
struct _BinaryFunctionConcept
00356 {
00357
void __constraints() {
00358 __r = __f(__first, __second);
00359 }
00360 _Func __f;
00361 _First __first;
00362 _Second __second;
00363 _Return __r;
00364 };
00365
00366
template <
class _Func,
class _First,
class _Second>
00367
struct _BinaryFunctionConcept<_Func, void, _First, _Second>
00368 {
00369
void __constraints() {
00370 __f(__first, __second);
00371 }
00372 _Func __f;
00373 _First __first;
00374 _Second __second;
00375 };
00376
00377
template <
class _Func,
class _Arg>
00378
struct _UnaryPredicateConcept
00379 {
00380
void __constraints() {
00381 __aux_require_boolean_expr(__f(__arg));
00382 }
00383 _Func __f;
00384 _Arg __arg;
00385 };
00386
00387
template <
class _Func,
class _First,
class _Second>
00388
struct _BinaryPredicateConcept
00389 {
00390
void __constraints() {
00391 __aux_require_boolean_expr(__f(__a, __b));
00392 }
00393 _Func __f;
00394 _First __a;
00395 _Second __b;
00396 };
00397
00398
00399
template <
class _Func,
class _First,
class _Second>
00400
struct _Const_BinaryPredicateConcept {
00401
void __constraints() {
00402 __const_constraints(__f);
00403 }
00404
void __const_constraints(
const _Func& __fun) {
00405 __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >();
00406
00407 __aux_require_boolean_expr(__fun(__a, __b));
00408 }
00409 _Func __f;
00410 _First __a;
00411 _Second __b;
00412 };
00413
00414
00415
00416
00417
template <
class _Tp>
00418
struct _TrivialIteratorConcept
00419 {
00420
void __constraints() {
00421
00422 __function_requires< _AssignableConcept<_Tp> >();
00423 __function_requires< _EqualityComparableConcept<_Tp> >();
00424
00425 (
void)*__i;
00426 }
00427 _Tp __i;
00428 };
00429
00430
template <
class _Tp>
00431
struct _Mutable_TrivialIteratorConcept
00432 {
00433
void __constraints() {
00434 __function_requires< _TrivialIteratorConcept<_Tp> >();
00435 *__i = *__j;
00436 }
00437 _Tp __i, __j;
00438 };
00439
00440
template <
class _Tp>
00441
struct _InputIteratorConcept
00442 {
00443
void __constraints() {
00444 __function_requires< _TrivialIteratorConcept<_Tp> >();
00445
00446
typedef typename std::iterator_traits<_Tp>::difference_type _Diff;
00447
00448
typedef typename std::iterator_traits<_Tp>::reference _Ref;
00449
typedef typename std::iterator_traits<_Tp>::pointer _Pt;
00450
typedef typename std::iterator_traits<_Tp>::iterator_category _Cat;
00451 __function_requires< _ConvertibleConcept<
00452
typename std::iterator_traits<_Tp>::iterator_category,
00453
std::input_iterator_tag> >();
00454 ++__i;
00455 __i++;
00456 }
00457 _Tp __i;
00458 };
00459
00460
template <
class _Tp,
class _ValueT>
00461
struct _OutputIteratorConcept
00462 {
00463
void __constraints() {
00464 __function_requires< _AssignableConcept<_Tp> >();
00465 ++__i;
00466 __i++;
00467 *__i++ = __t;
00468 }
00469 _Tp __i;
00470 _ValueT __t;
00471 };
00472
00473
template <
class _Tp>
00474
struct _ForwardIteratorConcept
00475 {
00476
void __constraints() {
00477 __function_requires< _InputIteratorConcept<_Tp> >();
00478 __function_requires< _DefaultConstructibleConcept<_Tp> >();
00479 __function_requires< _ConvertibleConcept<
00480
typename std::iterator_traits<_Tp>::iterator_category,
00481
std::forward_iterator_tag> >();
00482
typedef typename std::iterator_traits<_Tp>::reference _Ref;
00483 _Ref __r _IsUnused = *__i;
00484 }
00485 _Tp __i;
00486 };
00487
00488
template <
class _Tp>
00489
struct _Mutable_ForwardIteratorConcept
00490 {
00491
void __constraints() {
00492 __function_requires< _ForwardIteratorConcept<_Tp> >();
00493 *__i++ = *__i;
00494 }
00495 _Tp __i;
00496 };
00497
00498
template <
class _Tp>
00499
struct _BidirectionalIteratorConcept
00500 {
00501
void __constraints() {
00502 __function_requires< _ForwardIteratorConcept<_Tp> >();
00503 __function_requires< _ConvertibleConcept<
00504
typename std::iterator_traits<_Tp>::iterator_category,
00505
std::bidirectional_iterator_tag> >();
00506 --__i;
00507 __i--;
00508 }
00509 _Tp __i;
00510 };
00511
00512
template <
class _Tp>
00513
struct _Mutable_BidirectionalIteratorConcept
00514 {
00515
void __constraints() {
00516 __function_requires< _BidirectionalIteratorConcept<_Tp> >();
00517 __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >();
00518 *__i-- = *__i;
00519 }
00520 _Tp __i;
00521 };
00522
00523
00524
template <
class _Tp>
00525
struct _RandomAccessIteratorConcept
00526 {
00527
void __constraints() {
00528 __function_requires< _BidirectionalIteratorConcept<_Tp> >();
00529 __function_requires< _ComparableConcept<_Tp> >();
00530 __function_requires< _ConvertibleConcept<
00531
typename std::iterator_traits<_Tp>::iterator_category,
00532
std::random_access_iterator_tag> >();
00533
00534
typedef typename std::iterator_traits<_Tp>::reference _Ref;
00535
00536 __i += __n;
00537 __i = __i + __n; __i = __n + __i;
00538 __i -= __n;
00539 __i = __i - __n;
00540
00541 __n = __i - __j;
00542 (
void)__i[__n];
00543 }
00544 _Tp __a, __b;
00545 _Tp __i, __j;
00546
typename std::iterator_traits<_Tp>::difference_type __n;
00547 };
00548
00549
template <
class _Tp>
00550
struct _Mutable_RandomAccessIteratorConcept
00551 {
00552
void __constraints() {
00553 __function_requires< _RandomAccessIteratorConcept<_Tp> >();
00554 __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >();
00555 __i[__n] = *__i;
00556 }
00557 _Tp __i;
00558
typename std::iterator_traits<_Tp>::difference_type __n;
00559 };
00560
00561
00562
00563
00564
template <
class _Container>
00565
struct _ContainerConcept
00566 {
00567
typedef typename _Container::value_type _Value_type;
00568
typedef typename _Container::difference_type _Difference_type;
00569
typedef typename _Container::size_type _Size_type;
00570
typedef typename _Container::const_reference _Const_reference;
00571
typedef typename _Container::const_pointer _Const_pointer;
00572
typedef typename _Container::const_iterator _Const_iterator;
00573
00574
void __constraints() {
00575 __function_requires< _InputIteratorConcept<_Const_iterator> >();
00576 __function_requires< _AssignableConcept<_Container> >();
00577
const _Container __c;
00578 __i = __c.begin();
00579 __i = __c.end();
00580 __n = __c.size();
00581 __n = __c.max_size();
00582 __b = __c.empty();
00583 }
00584
bool __b;
00585 _Const_iterator __i;
00586 _Size_type __n;
00587 };
00588
00589
template <
class _Container>
00590
struct _Mutable_ContainerConcept
00591 {
00592
typedef typename _Container::value_type _Value_type;
00593
typedef typename _Container::reference _Reference;
00594
typedef typename _Container::iterator _Iterator;
00595
typedef typename _Container::pointer _Pointer;
00596
00597
void __constraints() {
00598 __function_requires< _ContainerConcept<_Container> >();
00599 __function_requires< _AssignableConcept<_Value_type> >();
00600 __function_requires< _InputIteratorConcept<_Iterator> >();
00601
00602 __i = __c.begin();
00603 __i = __c.end();
00604 __c.swap(__c2);
00605 }
00606 _Iterator __i;
00607 _Container __c, __c2;
00608 };
00609
00610
template <
class _ForwardContainer>
00611
struct _ForwardContainerConcept
00612 {
00613
void __constraints() {
00614 __function_requires< _ContainerConcept<_ForwardContainer> >();
00615
typedef typename _ForwardContainer::const_iterator _Const_iterator;
00616 __function_requires< _ForwardIteratorConcept<_Const_iterator> >();
00617 }
00618 };
00619
00620
template <
class _ForwardContainer>
00621
struct _Mutable_ForwardContainerConcept
00622 {
00623
void __constraints() {
00624 __function_requires< _ForwardContainerConcept<_ForwardContainer> >();
00625 __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >();
00626
typedef typename _ForwardContainer::iterator _Iterator;
00627 __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >();
00628 }
00629 };
00630
00631
template <
class _ReversibleContainer>
00632
struct _ReversibleContainerConcept
00633 {
00634
typedef typename _ReversibleContainer::const_iterator _Const_iterator;
00635
typedef typename _ReversibleContainer::const_reverse_iterator
00636 _Const_reverse_iterator;
00637
00638
void __constraints() {
00639 __function_requires< _ForwardContainerConcept<_ReversibleContainer> >();
00640 __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >();
00641 __function_requires<
00642 _BidirectionalIteratorConcept<_Const_reverse_iterator> >();
00643
00644
const _ReversibleContainer __c;
00645 _Const_reverse_iterator __i = __c.rbegin();
00646 __i = __c.rend();
00647 }
00648 };
00649
00650
template <
class _ReversibleContainer>
00651
struct _Mutable_ReversibleContainerConcept
00652 {
00653
typedef typename _ReversibleContainer::iterator _Iterator;
00654
typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator;
00655
00656
void __constraints() {
00657 __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >();
00658 __function_requires<
00659 _Mutable_ForwardContainerConcept<_ReversibleContainer> >();
00660 __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >();
00661 __function_requires<
00662 _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >();
00663
00664 _Reverse_iterator __i = __c.rbegin();
00665 __i = __c.rend();
00666 }
00667 _ReversibleContainer __c;
00668 };
00669
00670
template <
class _RandomAccessContainer>
00671
struct _RandomAccessContainerConcept
00672 {
00673
typedef typename _RandomAccessContainer::size_type _Size_type;
00674
typedef typename _RandomAccessContainer::const_reference _Const_reference;
00675
typedef typename _RandomAccessContainer::const_iterator _Const_iterator;
00676
typedef typename _RandomAccessContainer::const_reverse_iterator
00677 _Const_reverse_iterator;
00678
00679
void __constraints() {
00680 __function_requires<
00681 _ReversibleContainerConcept<_RandomAccessContainer> >();
00682 __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >();
00683 __function_requires<
00684 _RandomAccessIteratorConcept<_Const_reverse_iterator> >();
00685
00686
const _RandomAccessContainer __c;
00687 _Const_reference __r _IsUnused = __c[__n];
00688 }
00689 _Size_type __n;
00690 };
00691
00692
template <
class _RandomAccessContainer>
00693
struct _Mutable_RandomAccessContainerConcept
00694 {
00695
typedef typename _RandomAccessContainer::size_type _Size_type;
00696
typedef typename _RandomAccessContainer::reference _Reference;
00697
typedef typename _RandomAccessContainer::iterator _Iterator;
00698
typedef typename _RandomAccessContainer::reverse_iterator _Reverse_iterator;
00699
00700
void __constraints() {
00701 __function_requires<
00702 _RandomAccessContainerConcept<_RandomAccessContainer> >();
00703 __function_requires<
00704 _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >();
00705 __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >();
00706 __function_requires<
00707 _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >();
00708
00709 _Reference __r _IsUnused = __c[__i];
00710 }
00711 _Size_type __i;
00712 _RandomAccessContainer __c;
00713 };
00714
00715
00716
template <
class _Sequence>
00717
struct _SequenceConcept
00718 {
00719
typedef typename _Sequence::reference _Reference;
00720
typedef typename _Sequence::const_reference _Const_reference;
00721
00722
void __constraints() {
00723
00724
00725
00726 __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >();
00727 __function_requires< _DefaultConstructibleConcept<_Sequence> >();
00728
00729 _Sequence
00730 __c _IsUnused(__n),
00731 __c2 _IsUnused(__n, __t),
00732 __c3 _IsUnused(__first, __last);
00733
00734 __c.insert(__p, __t);
00735 __c.insert(__p, __n, __t);
00736 __c.insert(__p, __first, __last);
00737
00738 __c.erase(__p);
00739 __c.erase(__p, __q);
00740
00741 _Reference __r _IsUnused = __c.front();
00742
00743 __const_constraints(__c);
00744 }
00745
void __const_constraints(
const _Sequence& __c) {
00746 _Const_reference __r _IsUnused = __c.front();
00747 }
00748
typename _Sequence::value_type __t;
00749
typename _Sequence::size_type __n;
00750
typename _Sequence::value_type *__first, *__last;
00751
typename _Sequence::iterator __p, __q;
00752 };
00753
00754
template <
class _FrontInsertionSequence>
00755
struct _FrontInsertionSequenceConcept
00756 {
00757
void __constraints() {
00758 __function_requires< _SequenceConcept<_FrontInsertionSequence> >();
00759
00760 __c.push_front(__t);
00761 __c.pop_front();
00762 }
00763 _FrontInsertionSequence __c;
00764
typename _FrontInsertionSequence::value_type __t;
00765 };
00766
00767
template <
class _BackInsertionSequence>
00768
struct _BackInsertionSequenceConcept
00769 {
00770
typedef typename _BackInsertionSequence::reference _Reference;
00771
typedef typename _BackInsertionSequence::const_reference _Const_reference;
00772
00773
void __constraints() {
00774 __function_requires< _SequenceConcept<_BackInsertionSequence> >();
00775
00776 __c.push_back(__t);
00777 __c.pop_back();
00778 _Reference __r _IsUnused = __c.back();
00779 }
00780
void __const_constraints(
const _BackInsertionSequence& __c) {
00781 _Const_reference __r _IsUnused = __c.back();
00782 };
00783 _BackInsertionSequence __c;
00784
typename _BackInsertionSequence::value_type __t;
00785 };
00786
00787
template <
class _AssociativeContainer>
00788
struct _AssociativeContainerConcept
00789 {
00790
void __constraints() {
00791 __function_requires< _ForwardContainerConcept<_AssociativeContainer> >();
00792 __function_requires<
00793 _DefaultConstructibleConcept<_AssociativeContainer> >();
00794
00795 __i = __c.find(__k);
00796 __r = __c.equal_range(__k);
00797 __c.erase(__k);
00798 __c.erase(__i);
00799 __c.erase(__r.first, __r.second);
00800 __const_constraints(__c);
00801 }
00802
void __const_constraints(
const _AssociativeContainer& __c) {
00803 __ci = __c.find(__k);
00804 __n = __c.count(__k);
00805 __cr = __c.equal_range(__k);
00806 }
00807
typedef typename _AssociativeContainer::iterator _Iterator;
00808
typedef typename _AssociativeContainer::const_iterator _Const_iterator;
00809
00810 _AssociativeContainer __c;
00811 _Iterator __i;
00812
std::pair<_Iterator,_Iterator> __r;
00813 _Const_iterator __ci;
00814
std::pair<_Const_iterator,_Const_iterator> __cr;
00815
typename _AssociativeContainer::key_type __k;
00816
typename _AssociativeContainer::size_type __n;
00817 };
00818
00819
template <
class _UniqueAssociativeContainer>
00820
struct _UniqueAssociativeContainerConcept
00821 {
00822
void __constraints() {
00823 __function_requires<
00824 _AssociativeContainerConcept<_UniqueAssociativeContainer> >();
00825
00826 _UniqueAssociativeContainer __c(__first, __last);
00827
00828 __pos_flag = __c.insert(__t);
00829 __c.insert(__first, __last);
00830 }
00831
std::pair<typename _UniqueAssociativeContainer::iterator, bool> __pos_flag;
00832
typename _UniqueAssociativeContainer::value_type __t;
00833
typename _UniqueAssociativeContainer::value_type *__first, *__last;
00834 };
00835
00836
template <
class _MultipleAssociativeContainer>
00837
struct _MultipleAssociativeContainerConcept
00838 {
00839
void __constraints() {
00840 __function_requires<
00841 _AssociativeContainerConcept<_MultipleAssociativeContainer> >();
00842
00843 _MultipleAssociativeContainer __c(__first, __last);
00844
00845 __pos = __c.insert(__t);
00846 __c.insert(__first, __last);
00847
00848 }
00849
typename _MultipleAssociativeContainer::iterator __pos;
00850
typename _MultipleAssociativeContainer::value_type __t;
00851
typename _MultipleAssociativeContainer::value_type *__first, *__last;
00852 };
00853
00854
template <
class _SimpleAssociativeContainer>
00855
struct _SimpleAssociativeContainerConcept
00856 {
00857
void __constraints() {
00858 __function_requires<
00859 _AssociativeContainerConcept<_SimpleAssociativeContainer> >();
00860
typedef typename _SimpleAssociativeContainer::key_type _Key_type;
00861
typedef typename _SimpleAssociativeContainer::value_type _Value_type;
00862
typedef typename _Aux_require_same<_Key_type, _Value_type>::_Type
00863 _Required;
00864 }
00865 };
00866
00867
template <
class _SimpleAssociativeContainer>
00868
struct _PairAssociativeContainerConcept
00869 {
00870
void __constraints() {
00871 __function_requires<
00872 _AssociativeContainerConcept<_SimpleAssociativeContainer> >();
00873
typedef typename _SimpleAssociativeContainer::key_type _Key_type;
00874
typedef typename _SimpleAssociativeContainer::value_type _Value_type;
00875
typedef typename _SimpleAssociativeContainer::mapped_type _Mapped_type;
00876
typedef std::pair<const _Key_type, _Mapped_type> _Required_value_type;
00877
typedef typename _Aux_require_same<_Value_type,
00878 _Required_value_type>::_Type _Required;
00879 }
00880 };
00881
00882
template <
class _SortedAssociativeContainer>
00883
struct _SortedAssociativeContainerConcept
00884 {
00885
void __constraints() {
00886 __function_requires<
00887 _AssociativeContainerConcept<_SortedAssociativeContainer> >();
00888 __function_requires<
00889 _ReversibleContainerConcept<_SortedAssociativeContainer> >();
00890
00891 _SortedAssociativeContainer
00892 __c _IsUnused(__kc),
00893 __c2 _IsUnused(__first, __last),
00894 __c3 _IsUnused(__first, __last, __kc);
00895
00896 __p = __c.upper_bound(__k);
00897 __p = __c.lower_bound(__k);
00898 __r = __c.equal_range(__k);
00899
00900 __c.insert(__p, __t);
00901 }
00902
void __const_constraints(
const _SortedAssociativeContainer& __c) {
00903 __kc = __c.key_comp();
00904 __vc = __c.value_comp();
00905
00906 __cp = __c.upper_bound(__k);
00907 __cp = __c.lower_bound(__k);
00908 __cr = __c.equal_range(__k);
00909 }
00910
typename _SortedAssociativeContainer::key_compare __kc;
00911
typename _SortedAssociativeContainer::value_compare __vc;
00912
typename _SortedAssociativeContainer::value_type __t;
00913
typename _SortedAssociativeContainer::key_type __k;
00914
typedef typename _SortedAssociativeContainer::iterator _Iterator;
00915
typedef typename _SortedAssociativeContainer::const_iterator
00916 _Const_iterator;
00917
00918 _Iterator __p;
00919 _Const_iterator __cp;
00920
std::pair<_Iterator,_Iterator> __r;
00921
std::pair<_Const_iterator,_Const_iterator> __cr;
00922
typename _SortedAssociativeContainer::value_type *__first, *__last;
00923 };
00924
00925
00926
00927 }
00928
00929
#undef _IsUnused
00930
00931
#endif // _GLIBCXX_BOOST_CONCEPT_CHECK
00932
00933