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
00047 #ifndef STLSOFT_INCL_STLSOFT_UTIL_HPP_TRUE_TYPEDEF
00048 #define STLSOFT_INCL_STLSOFT_UTIL_HPP_TRUE_TYPEDEF
00049
00050 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00051 # define STLSOFT_VER_STLSOFT_UTIL_HPP_TRUE_TYPEDEF_MAJOR 4
00052 # define STLSOFT_VER_STLSOFT_UTIL_HPP_TRUE_TYPEDEF_MINOR 0
00053 # define STLSOFT_VER_STLSOFT_UTIL_HPP_TRUE_TYPEDEF_REVISION 1
00054 # define STLSOFT_VER_STLSOFT_UTIL_HPP_TRUE_TYPEDEF_EDIT 74
00055 #endif
00056
00057
00058
00059
00060
00061 #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
00062 # include <stlsoft/stlsoft.h>
00063 #endif
00064
00065
00066
00067
00068
00069 #ifndef _STLSOFT_NO_NAMESPACE
00070 namespace stlsoft
00071 {
00072 #endif
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00111 template< ss_typename_param_k T
00112 , ss_typename_param_k U>
00113 class true_typedef
00114 {
00115 public:
00117 typedef T value_type;
00119 typedef U unique_type;
00121 typedef true_typedef<T, U> class_type;
00123 typedef T& reference;
00125 typedef T const& const_reference;
00126
00127
00128 public:
00130 true_typedef()
00131 : m_value(value_type())
00132 {}
00134 ss_explicit_k true_typedef(value_type const& value)
00135 : m_value(value)
00136 {}
00138 true_typedef(class_type const& rhs)
00139 : m_value(rhs.m_value)
00140 {}
00141
00143 class_type const& operator =(class_type const& rhs)
00144 {
00145 m_value = rhs.m_value;
00146
00147 return *this;
00148 }
00149
00150
00151 public:
00153 const_reference base_type_value() const
00154 {
00155 return m_value;
00156 }
00158 reference base_type_value()
00159 {
00160 return m_value;
00161 }
00162
00163
00164 private:
00165 value_type m_value;
00166
00167
00168 private:
00169
00170
00171 class_type const& operator =(value_type const& value);
00172 };
00173
00174
00175
00176
00177
00178 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00179
00180
00181
00182 template< ss_typename_param_k T
00183 , ss_typename_param_k U>
00184 inline true_typedef<T, U>& operator ++(true_typedef<T, U> &v)
00185 {
00186 ++v.base_type_value();
00187
00188 return v;
00189 }
00190
00191
00192
00193 template< ss_typename_param_k T
00194 , ss_typename_param_k U>
00195 inline true_typedef<T, U> const operator ++(true_typedef<T, U> &v, int)
00196 {
00197 true_typedef<T, U> r(v);
00198
00199 v.base_type_value()++;
00200
00201 return r;
00202 }
00203
00204
00205
00206 template< ss_typename_param_k T
00207 , ss_typename_param_k U>
00208 inline true_typedef<T, U>& operator --(true_typedef<T, U> &v)
00209 {
00210 --v.base_type_value();
00211
00212 return v;
00213 }
00214
00215
00216
00217 template< ss_typename_param_k T
00218 , ss_typename_param_k U>
00219 inline true_typedef<T, U> const operator --(true_typedef<T, U> &v, int)
00220 {
00221 true_typedef<T, U> r(v);
00222
00223 v.base_type_value()--;
00224
00225 return r;
00226 }
00227
00228
00229
00230 template< ss_typename_param_k T
00231 , ss_typename_param_k U>
00232 inline ss_bool_t operator ==(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00233 {
00234 return lhs.base_type_value() == rhs.base_type_value();
00235 }
00236
00237 template< ss_typename_param_k T
00238 , ss_typename_param_k U>
00239 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00240 inline ss_bool_t operator ==(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00241 #else
00242 inline ss_bool_t operator ==(true_typedef<T, U> const& lhs, T const& rhs)
00243 #endif
00244 {
00245 return lhs.base_type_value() == rhs;
00246 }
00247
00248 template< ss_typename_param_k T
00249 , ss_typename_param_k U>
00250 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00251 inline ss_bool_t operator ==(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00252 #else
00253 inline ss_bool_t operator ==(T const& lhs, true_typedef<T, U> const& rhs)
00254 #endif
00255 {
00256 return lhs == rhs.base_type_value();
00257 }
00258
00259
00260
00261
00262 template< ss_typename_param_k T
00263 , ss_typename_param_k U>
00264 inline ss_bool_t operator !=(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00265 {
00266 return ! operator ==(lhs, rhs);
00267 }
00268
00269 template< ss_typename_param_k T
00270 , ss_typename_param_k U>
00271 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00272 inline ss_bool_t operator !=(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00273 #else
00274 inline ss_bool_t operator !=(true_typedef<T, U> const& lhs, T const& rhs)
00275 #endif
00276 {
00277 return ! operator ==(lhs, rhs);
00278 }
00279
00280 template< ss_typename_param_k T
00281 , ss_typename_param_k U>
00282 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00283 inline ss_bool_t operator !=(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00284 #else
00285 inline ss_bool_t operator !=(T const& lhs, true_typedef<T, U> const& rhs)
00286 #endif
00287 {
00288 return ! operator ==(lhs, rhs);
00289 }
00290
00291
00292
00293 template< ss_typename_param_k T
00294 , ss_typename_param_k U>
00295 inline ss_bool_t operator <(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00296 {
00297 return lhs.base_type_value() < rhs.base_type_value();
00298 }
00299
00300 template< ss_typename_param_k T
00301 , ss_typename_param_k U>
00302 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00303 inline ss_bool_t operator <(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00304 #else
00305 inline ss_bool_t operator <(true_typedef<T, U> const& lhs, T const& rhs)
00306 #endif
00307 {
00308 return lhs.base_type_value() < rhs;
00309 }
00310
00311 template< ss_typename_param_k T
00312 , ss_typename_param_k U>
00313 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00314 inline ss_bool_t operator <(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00315 #else
00316 inline ss_bool_t operator <(T const& lhs, true_typedef<T, U> const& rhs)
00317 #endif
00318 {
00319 return lhs < rhs.base_type_value();
00320 }
00321
00322
00323
00324 template< ss_typename_param_k T
00325 , ss_typename_param_k U>
00326 inline ss_bool_t operator <=(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00327 {
00328 return lhs.base_type_value() <= rhs.base_type_value();
00329 }
00330
00331 template< ss_typename_param_k T
00332 , ss_typename_param_k U>
00333 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00334 inline ss_bool_t operator <=(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00335 #else
00336 inline ss_bool_t operator <=(true_typedef<T, U> const& lhs, T const& rhs)
00337 #endif
00338 {
00339 return lhs.base_type_value() <= rhs;
00340 }
00341
00342 template< ss_typename_param_k T
00343 , ss_typename_param_k U>
00344 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00345 inline ss_bool_t operator <=(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00346 #else
00347 inline ss_bool_t operator <=(T const& lhs, true_typedef<T, U> const& rhs)
00348 #endif
00349 {
00350 return lhs <= rhs.base_type_value();
00351 }
00352
00353
00354
00355 template< ss_typename_param_k T
00356 , ss_typename_param_k U>
00357 inline ss_bool_t operator >(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00358 {
00359 return lhs.base_type_value() > rhs.base_type_value();
00360 }
00361
00362 template< ss_typename_param_k T
00363 , ss_typename_param_k U>
00364 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00365 inline ss_bool_t operator >(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00366 #else
00367 inline ss_bool_t operator >(true_typedef<T, U> const& lhs, T const& rhs)
00368 #endif
00369 {
00370 return lhs.base_type_value() > rhs;
00371 }
00372
00373 template< ss_typename_param_k T
00374 , ss_typename_param_k U>
00375 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00376 inline ss_bool_t operator >(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00377 #else
00378 inline ss_bool_t operator >(T const& lhs, true_typedef<T, U> const& rhs)
00379 #endif
00380 {
00381 return lhs > rhs.base_type_value();
00382 }
00383
00384
00385
00386 template< ss_typename_param_k T
00387 , ss_typename_param_k U>
00388 inline ss_bool_t operator >=(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00389 {
00390 return lhs.base_type_value() >= rhs.base_type_value();
00391 }
00392
00393 template< ss_typename_param_k T
00394 , ss_typename_param_k U>
00395 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00396 inline ss_bool_t operator >=(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00397 #else
00398 inline ss_bool_t operator >=(true_typedef<T, U> const& lhs, T const& rhs)
00399 #endif
00400 {
00401 return lhs.base_type_value() >= rhs;
00402 }
00403
00404 template< ss_typename_param_k T
00405 , ss_typename_param_k U>
00406 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00407 inline ss_bool_t operator >=(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00408 #else
00409 inline ss_bool_t operator >=(T const& lhs, true_typedef<T, U> const& rhs)
00410 #endif
00411 {
00412 return lhs >= rhs.base_type_value();
00413 }
00414
00415
00416
00417 template< ss_typename_param_k T
00418 , ss_typename_param_k U>
00419 inline true_typedef<T, U> operator +(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00420 {
00421 return true_typedef<T, U>(lhs.base_type_value() + rhs.base_type_value());
00422 }
00423
00424 template< ss_typename_param_k T
00425 , ss_typename_param_k U>
00426 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00427 inline true_typedef<T, U> operator +(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00428 #else
00429 inline true_typedef<T, U> operator +(true_typedef<T, U> const& lhs, T const& rhs)
00430 #endif
00431 {
00432 return true_typedef<T, U>(lhs.base_type_value() + rhs);
00433 }
00434
00435 template< ss_typename_param_k T
00436 , ss_typename_param_k U>
00437 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00438 inline true_typedef<T, U> operator +(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00439 #else
00440 inline true_typedef<T, U> operator +(T const& lhs, true_typedef<T, U> const& rhs)
00441 #endif
00442 {
00443 return true_typedef<T, U>(lhs + rhs.base_type_value());
00444 }
00445
00446
00447
00448 template< ss_typename_param_k T
00449 , ss_typename_param_k U>
00450 inline true_typedef<T, U> operator -(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00451 {
00452 return true_typedef<T, U>(lhs.base_type_value() - rhs.base_type_value());
00453 }
00454
00455 template< ss_typename_param_k T
00456 , ss_typename_param_k U>
00457 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00458 inline true_typedef<T, U> operator -(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00459 #else
00460 inline true_typedef<T, U> operator -(true_typedef<T, U> const& lhs, T const& rhs)
00461 #endif
00462 {
00463 return true_typedef<T, U>(lhs.base_type_value() - rhs);
00464 }
00465
00466 template< ss_typename_param_k T
00467 , ss_typename_param_k U>
00468 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00469 inline true_typedef<T, U> operator -(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00470 #else
00471 inline true_typedef<T, U> operator -(T const& lhs, true_typedef<T, U> const& rhs)
00472 #endif
00473 {
00474 return true_typedef<T, U>(lhs - rhs.base_type_value());
00475 }
00476
00477
00478
00479 template< ss_typename_param_k T
00480 , ss_typename_param_k U>
00481 inline true_typedef<T, U> operator *(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00482 {
00483 return true_typedef<T, U>(lhs.base_type_value() * rhs.base_type_value());
00484 }
00485
00486 template< ss_typename_param_k T
00487 , ss_typename_param_k U>
00488 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00489 inline true_typedef<T, U> operator *(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00490 #else
00491 inline true_typedef<T, U> operator *(true_typedef<T, U> const& lhs, T const& rhs)
00492 #endif
00493 {
00494 return true_typedef<T, U>(lhs.base_type_value() * rhs);
00495 }
00496
00497 template< ss_typename_param_k T
00498 , ss_typename_param_k U>
00499 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00500 inline true_typedef<T, U> operator *(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00501 #else
00502 inline true_typedef<T, U> operator *(T const& lhs, true_typedef<T, U> const& rhs)
00503 #endif
00504 {
00505 return true_typedef<T, U>(lhs * rhs.base_type_value());
00506 }
00507
00508
00509
00510 template< ss_typename_param_k T
00511 , ss_typename_param_k U>
00512 inline true_typedef<T, U> operator /(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00513 {
00514 return true_typedef<T, U>(lhs.base_type_value() / rhs.base_type_value());
00515 }
00516
00517 template< ss_typename_param_k T
00518 , ss_typename_param_k U>
00519 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00520 inline true_typedef<T, U> operator /(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00521 #else
00522 inline true_typedef<T, U> operator /(true_typedef<T, U> const& lhs, T const& rhs)
00523 #endif
00524 {
00525 return true_typedef<T, U>(lhs.base_type_value() / rhs);
00526 }
00527
00528
00529 template< ss_typename_param_k T
00530 , ss_typename_param_k U>
00531 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00532 inline true_typedef<T, U> operator /(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00533 #else
00534 inline true_typedef<T, U> operator /(T const& lhs, true_typedef<T, U> const& rhs)
00535 #endif
00536 {
00537 return true_typedef<T, U>(lhs / rhs.base_type_value());
00538 }
00539
00540
00541
00542 template< ss_typename_param_k T
00543 , ss_typename_param_k U>
00544 inline true_typedef<T, U> operator %(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00545 {
00546 return true_typedef<T, U>(lhs.base_type_value() % rhs.base_type_value());
00547 }
00548
00549 template< ss_typename_param_k T
00550 , ss_typename_param_k U>
00551 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00552 inline true_typedef<T, U> operator %(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00553 #else
00554 inline true_typedef<T, U> operator %(true_typedef<T, U> const& lhs, T const& rhs)
00555 #endif
00556 {
00557 return true_typedef<T, U>(lhs.base_type_value() % rhs);
00558 }
00559
00560 template< ss_typename_param_k T
00561 , ss_typename_param_k U>
00562 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00563 inline true_typedef<T, U> operator %(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00564 #else
00565 inline true_typedef<T, U> operator %(T const& lhs, true_typedef<T, U> const& rhs)
00566 #endif
00567 {
00568 return true_typedef<T, U>(lhs % rhs.base_type_value());
00569 }
00570
00571
00572
00573 template< ss_typename_param_k T
00574 , ss_typename_param_k U>
00575 inline true_typedef<T, U> operator ^(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00576 {
00577 return true_typedef<T, U>(lhs.base_type_value() ^ rhs.base_type_value());
00578 }
00579
00580 template< ss_typename_param_k T
00581 , ss_typename_param_k U>
00582 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00583 inline true_typedef<T, U> operator ^(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00584 #else
00585 inline true_typedef<T, U> operator ^(true_typedef<T, U> const& lhs, T const& rhs)
00586 #endif
00587 {
00588 return true_typedef<T, U>(lhs.base_type_value() ^ rhs);
00589 }
00590
00591 template< ss_typename_param_k T
00592 , ss_typename_param_k U>
00593 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00594 inline true_typedef<T, U> operator ^(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00595 #else
00596 inline true_typedef<T, U> operator ^(T const& lhs, true_typedef<T, U> const& rhs)
00597 #endif
00598 {
00599 return true_typedef<T, U>(lhs ^ rhs.base_type_value());
00600 }
00601
00602
00603
00604 template< ss_typename_param_k T
00605 , ss_typename_param_k U>
00606 inline true_typedef<T, U> operator ~(true_typedef<T, U> const& v)
00607 {
00608 return true_typedef<T, U>(~v.base_type_value());
00609 }
00610
00611
00612
00613 template< ss_typename_param_k T
00614 , ss_typename_param_k U>
00615 inline true_typedef<T, U> operator <<(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00616 {
00617 return true_typedef<T, U>(lhs.base_type_value() << rhs.base_type_value());
00618 }
00619
00620 template< ss_typename_param_k T
00621 , ss_typename_param_k U>
00622 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00623 inline true_typedef<T, U> operator <<(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00624 #else
00625 inline true_typedef<T, U> operator <<(true_typedef<T, U> const& lhs, T const& rhs)
00626 #endif
00627 {
00628 return true_typedef<T, U>(lhs.base_type_value() << rhs);
00629 }
00630
00631 template< ss_typename_param_k T
00632 , ss_typename_param_k U>
00633 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00634 inline true_typedef<T, U> operator <<(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00635 #else
00636 inline true_typedef<T, U> operator <<(T const& lhs, true_typedef<T, U> const& rhs)
00637 #endif
00638 {
00639 return true_typedef<T, U>(lhs << rhs.base_type_value());
00640 }
00641
00642
00643
00644 template< ss_typename_param_k T
00645 , ss_typename_param_k U>
00646 inline true_typedef<T, U> operator >>(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00647 {
00648 return true_typedef<T, U>(lhs.base_type_value() >> rhs.base_type_value());
00649 }
00650
00651 template< ss_typename_param_k T
00652 , ss_typename_param_k U>
00653 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00654 inline true_typedef<T, U> operator >>(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00655 #else
00656 inline true_typedef<T, U> operator >>(true_typedef<T, U> const& lhs, T const& rhs)
00657 #endif
00658 {
00659 return true_typedef<T, U>(lhs.base_type_value() >> rhs);
00660 }
00661
00662 template< ss_typename_param_k T
00663 , ss_typename_param_k U>
00664 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00665 inline true_typedef<T, U> operator >>(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00666 #else
00667 inline true_typedef<T, U> operator >>(T const& lhs, true_typedef<T, U> const& rhs)
00668 #endif
00669 {
00670 return true_typedef<T, U>(lhs >> rhs.base_type_value());
00671 }
00672
00673
00674
00675 template< ss_typename_param_k T
00676 , ss_typename_param_k U>
00677 inline true_typedef<T, U> operator &(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00678 {
00679 return true_typedef<T, U>(lhs.base_type_value() & rhs.base_type_value());
00680 }
00681
00682 template< ss_typename_param_k T
00683 , ss_typename_param_k U>
00684 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00685 inline true_typedef<T, U> operator &(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00686 #else
00687 inline true_typedef<T, U> operator &(true_typedef<T, U> const& lhs, T const& rhs)
00688 #endif
00689 {
00690 return true_typedef<T, U>(lhs.base_type_value() & rhs);
00691 }
00692
00693 template< ss_typename_param_k T
00694 , ss_typename_param_k U>
00695 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00696 inline true_typedef<T, U> operator &(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00697 #else
00698 inline true_typedef<T, U> operator &(T const& lhs, true_typedef<T, U> const& rhs)
00699 #endif
00700 {
00701 return true_typedef<T, U>(lhs & rhs.base_type_value());
00702 }
00703
00704
00705
00706 template< ss_typename_param_k T
00707 , ss_typename_param_k U>
00708 inline true_typedef<T, U> operator |(true_typedef<T, U> const& lhs, true_typedef<T, U> const& rhs)
00709 {
00710 return true_typedef<T, U>(lhs.base_type_value() | rhs.base_type_value());
00711 }
00712
00713 template< ss_typename_param_k T
00714 , ss_typename_param_k U>
00715 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00716 inline true_typedef<T, U> operator |(true_typedef<T, U> const& lhs, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00717 #else
00718 inline true_typedef<T, U> operator |(true_typedef<T, U> const& lhs, T const& rhs)
00719 #endif
00720 {
00721 return true_typedef<T, U>(lhs.base_type_value() | rhs);
00722 }
00723
00724 template< ss_typename_param_k T
00725 , ss_typename_param_k U>
00726 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00727 inline true_typedef<T, U> operator |(ss_typename_type_k true_typedef<T, U>::value_type const& lhs, true_typedef<T, U> const& rhs)
00728 #else
00729 inline true_typedef<T, U> operator |(T const& lhs, true_typedef<T, U> const& rhs)
00730 #endif
00731 {
00732 return true_typedef<T, U>(lhs | rhs.base_type_value());
00733 }
00734
00735
00736
00737 template< ss_typename_param_k T
00738 , ss_typename_param_k U>
00739 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00740 inline true_typedef<T, U> const& operator +=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00741 #else
00742 inline true_typedef<T, U> const& operator +=(true_typedef<T, U> &v, T const& rhs)
00743 #endif
00744 {
00745 v.base_type_value() += rhs;
00746
00747 return v;
00748 }
00749
00750 template< ss_typename_param_k T
00751 , ss_typename_param_k U>
00752 inline true_typedef<T, U> const& operator +=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00753 {
00754 v.base_type_value() += rhs.base_type_value();
00755
00756 return v;
00757 }
00758
00759
00760
00761 template< ss_typename_param_k T
00762 , ss_typename_param_k U>
00763 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00764 inline true_typedef<T, U> const& operator -=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00765 #else
00766 inline true_typedef<T, U> const& operator -=(true_typedef<T, U> &v, T const& rhs)
00767 #endif
00768 {
00769 v.base_type_value() -= rhs;
00770
00771 return v;
00772 }
00773
00774 template< ss_typename_param_k T
00775 , ss_typename_param_k U>
00776 inline true_typedef<T, U> const& operator -=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00777 {
00778 v.base_type_value() -= rhs.base_type_value();
00779
00780 return v;
00781 }
00782
00783
00784
00785 template< ss_typename_param_k T
00786 , ss_typename_param_k U>
00787 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00788 inline true_typedef<T, U> const& operator *=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00789 #else
00790 inline true_typedef<T, U> const& operator *=(true_typedef<T, U> &v, T const& rhs)
00791 #endif
00792 {
00793 v.base_type_value() *= rhs;
00794
00795 return v;
00796 }
00797
00798 template< ss_typename_param_k T
00799 , ss_typename_param_k U>
00800 inline true_typedef<T, U> const& operator *=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00801 {
00802 v.base_type_value() *= rhs.base_type_value();
00803
00804 return v;
00805 }
00806
00807
00808
00809 template< ss_typename_param_k T
00810 , ss_typename_param_k U>
00811 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00812 inline true_typedef<T, U> const& operator /=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00813 #else
00814 inline true_typedef<T, U> const& operator /=(true_typedef<T, U> &v, T const& rhs)
00815 #endif
00816 {
00817 v.base_type_value() /= rhs;
00818
00819 return v;
00820 }
00821
00822 template< ss_typename_param_k T
00823 , ss_typename_param_k U>
00824 inline true_typedef<T, U> const& operator /=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00825 {
00826 v.base_type_value() /= rhs.base_type_value();
00827
00828 return v;
00829 }
00830
00831
00832
00833 template< ss_typename_param_k T
00834 , ss_typename_param_k U>
00835 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00836 inline true_typedef<T, U> const& operator %=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00837 #else
00838 inline true_typedef<T, U> const& operator %=(true_typedef<T, U> &v, T const& rhs)
00839 #endif
00840 {
00841 v.base_type_value() %= rhs;
00842
00843 return v;
00844 }
00845
00846 template< ss_typename_param_k T
00847 , ss_typename_param_k U>
00848 inline true_typedef<T, U> const& operator %=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00849 {
00850 v.base_type_value() %= rhs.base_type_value();
00851
00852 return v;
00853 }
00854
00855
00856
00857 template< ss_typename_param_k T
00858 , ss_typename_param_k U>
00859 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00860 inline true_typedef<T, U> const& operator ^=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00861 #else
00862 inline true_typedef<T, U> const& operator ^=(true_typedef<T, U> &v, T const& rhs)
00863 #endif
00864 {
00865 v.base_type_value() ^= rhs;
00866
00867 return v;
00868 }
00869
00870 template< ss_typename_param_k T
00871 , ss_typename_param_k U>
00872 inline true_typedef<T, U> const& operator ^=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00873 {
00874 v.base_type_value() ^= rhs.base_type_value();
00875
00876 return v;
00877 }
00878
00879
00880
00881 template< ss_typename_param_k T
00882 , ss_typename_param_k U>
00883 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00884 inline true_typedef<T, U> const& operator <<=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00885 #else
00886 inline true_typedef<T, U> const& operator <<=(true_typedef<T, U> &v, T const& rhs)
00887 #endif
00888 {
00889 v.base_type_value() <<= rhs;
00890
00891 return v;
00892 }
00893
00894 template< ss_typename_param_k T
00895 , ss_typename_param_k U>
00896 inline true_typedef<T, U> const& operator <<=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00897 {
00898 v.base_type_value() <<= rhs.base_type_value();
00899
00900 return v;
00901 }
00902
00903
00904
00905 template< ss_typename_param_k T
00906 , ss_typename_param_k U>
00907 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00908 inline true_typedef<T, U> const& operator >>=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00909 #else
00910 inline true_typedef<T, U> const& operator >>=(true_typedef<T, U> &v, T const& rhs)
00911 #endif
00912 {
00913 v.base_type_value() >>= rhs;
00914
00915 return v;
00916 }
00917
00918 template< ss_typename_param_k T
00919 , ss_typename_param_k U>
00920 inline true_typedef<T, U> const& operator >>=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00921 {
00922 v.base_type_value() >>= rhs.base_type_value();
00923
00924 return v;
00925 }
00926
00927
00928
00929 template< ss_typename_param_k T
00930 , ss_typename_param_k U>
00931 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00932 inline true_typedef<T, U> const& operator &=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00933 #else
00934 inline true_typedef<T, U> const& operator &=(true_typedef<T, U> &v, T const& rhs)
00935 #endif
00936 {
00937 v.base_type_value() &= rhs;
00938
00939 return v;
00940 }
00941
00942 template< ss_typename_param_k T
00943 , ss_typename_param_k U>
00944 inline true_typedef<T, U> const& operator &=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00945 {
00946 v.base_type_value() &= rhs.base_type_value();
00947
00948 return v;
00949 }
00950
00951
00952
00953 template< ss_typename_param_k T
00954 , ss_typename_param_k U>
00955 #ifdef STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
00956 inline true_typedef<T, U> const& operator |=(true_typedef<T, U> &v, ss_typename_type_k true_typedef<T, U>::value_type const& rhs)
00957 #else
00958 inline true_typedef<T, U> const& operator |=(true_typedef<T, U> &v, T const& rhs)
00959 #endif
00960 {
00961 v.base_type_value() |= rhs;
00962
00963 return v;
00964 }
00965
00966 template< ss_typename_param_k T
00967 , ss_typename_param_k U>
00968 inline true_typedef<T, U> const& operator |=(true_typedef<T, U> &v, true_typedef<T, U> const& rhs)
00969 {
00970 v.base_type_value() |= rhs.base_type_value();
00971
00972 return v;
00973 }
00974
00975 #endif
00976
00977
00978
00979
00980
00981 #ifdef STLSOFT_UNITTEST
00982 # include "./unittest/true_typedef_unittest_.h"
00983 #endif
00984
00985
00986
00987 #ifndef _STLSOFT_NO_NAMESPACE
00988 }
00989 #endif
00990
00991
00992
00993 #endif
00994
00995