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 
00043 
00044 
00045 
00052 #ifndef STLSOFT_INCL_STLSOFT_UTIL_HPP_MUST_INIT
00053 #define STLSOFT_INCL_STLSOFT_UTIL_HPP_MUST_INIT
00054 
00055 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00056 # define STLSOFT_VER_STLSOFT_UTIL_HPP_MUST_INIT_MAJOR       1
00057 # define STLSOFT_VER_STLSOFT_UTIL_HPP_MUST_INIT_MINOR       1
00058 # define STLSOFT_VER_STLSOFT_UTIL_HPP_MUST_INIT_REVISION    4
00059 # define STLSOFT_VER_STLSOFT_UTIL_HPP_MUST_INIT_EDIT        17
00060 #endif 
00061 
00062 
00063 
00064 
00065 
00066 #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
00067 # include <stlsoft/stlsoft.h>
00068 #endif 
00069 
00070 #ifdef STLSOFT_UNITTEST
00071 # include <string>
00072 #endif 
00073 
00074 
00075 
00076 
00077 
00078 #ifndef _STLSOFT_NO_NAMESPACE
00079 namespace stlsoft
00080 {
00081 #endif 
00082 
00083 
00084 
00085 
00086 
00117 
00118 
00119 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00120 
00121 template <ss_typename_param_k T>
00122 class must_init_builtin
00123 {
00126 public:
00128     typedef T                       value_type;
00130     typedef must_init_builtin<T>    class_type;
00132     typedef T&                      reference;
00134     typedef T const&                const_reference;
00136 
00139 public:
00141     ss_explicit_k must_init_builtin(T t)
00142         : value(t)
00143     {}
00144 
00146     operator value_type () const
00147     {
00148         return value;
00149     }
00150 
00151     class_type& operator =(const value_type rhs)
00152     {
00153         value = rhs;
00154 
00155         return *this;
00156     }
00158 
00161 public:
00163     const_reference base_type_value() const
00164     {
00165         return value;
00166     }
00168     reference       base_type_value()
00169     {
00170         return value;
00171     }
00172 
00174     const_reference get() const
00175     {
00176         return base_type_value();
00177     }
00179     reference       get()
00180     {
00181         return base_type_value();
00182     }
00184 
00187 public:
00197     value_type  value;
00199 };
00200 
00201 #endif 
00202 
00203 template <ss_typename_param_k T>
00204 class must_init
00205 {
00208 public:
00210     typedef T               value_type;
00212     typedef must_init<T>    class_type;
00214     typedef T&              reference;
00216     typedef T const&        const_reference;
00218 
00221 public:
00223     ss_explicit_k must_init(T t)
00224         : value(t)
00225     {}
00226 
00228     operator value_type const& () const
00229     {
00230         return value;
00231     }
00232 
00233     class_type& operator =(value_type const &rhs)
00234     {
00235         value = rhs;
00236 
00237         return *this;
00238     }
00240 
00243 public:
00245     const_reference base_type_value() const
00246     {
00247         return value;
00248     }
00250     reference       base_type_value()
00251     {
00252         return value;
00253     }
00254 
00256     const_reference get() const
00257     {
00258         return base_type_value();
00259     }
00261     reference       get()
00262     {
00263         return base_type_value();
00264     }
00266 
00269 public:
00279     value_type  value;
00281 };
00282 
00283 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
00284 
00285 # define STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(type)       \
00286                                                             \
00287     STLSOFT_TEMPLATE_SPECIALISATION                         \
00288     class must_init<type>                                   \
00289         : public must_init_builtin<type>                    \
00290     {                                                       \
00291     public:                                                 \
00292         typedef must_init<type> class_type;                 \
00293     public:                                                 \
00294         explicit must_init(type value)                      \
00295             : must_init_builtin<type>(value)                \
00296         {}                                                  \
00297         class_type& operator =(const value_type rhs)        \
00298         {                                                   \
00299             value = rhs;                                    \
00300             return *this;                                   \
00301         }                                                   \
00302     }
00303 
00304 # ifdef STLSOFT_CF_NATIVE_BOOL_SUPPORT
00305 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(bool);
00306 # endif 
00307 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(char);
00308 # ifdef STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
00309 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(wchar_t);
00310 # endif 
00311 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(signed char);
00312 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(unsigned char);
00313 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(short);
00314 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(unsigned short);
00315 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(int);
00316 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(unsigned int);
00317 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(long);
00318 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(unsigned long);
00319 #ifdef STLSOFT_CF_64BIT_INT_SUPPORT
00320 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(ss_sint64_t);
00321 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(ss_uint64_t);
00322 #endif 
00323 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(float);
00324 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(double);
00325 STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_(long double);
00326 
00327 # undef STLSOFT_UTIL_MUST_INIT_DEFINE_BUILTIN_
00328 
00329 #endif 
00330 
00331 
00332 
00334 
00335 
00340 typedef must_init<bool>                 bool_init_t;
00341 
00346 typedef must_init<char>                 char_init_t;
00347 
00352 typedef must_init<wchar_t>              wchar_t_init_t;
00353 
00358 typedef must_init<signed char>          signed_char_init_t;
00359 
00364 typedef must_init<unsigned char>        unsigned_char_init_t;
00365 
00370 typedef must_init<short>                short_init_t;
00371 
00376 typedef must_init<unsigned short>       unsigned_short_init_t;
00377 
00382 typedef must_init<int>                  int_init_t;
00383 
00388 typedef must_init<unsigned int>         unsigned_int_init_t;
00389 
00394 typedef must_init<long>                 long_init_t;
00395 
00400 typedef must_init<unsigned long>        unsigned_long_init_t;
00401 
00402 #ifdef STLSOFT_CF_64BIT_INT_SUPPORT
00403 
00408 typedef must_init<ss_sint64_t>          sint64_init_t;
00409 
00414 typedef must_init<ss_uint64_t>          uint64_init_t;
00415 
00416 #endif 
00417 
00422 typedef must_init<float>                float_init_t;
00423 
00428 typedef must_init<double>               double_init_t;
00429 
00434 typedef must_init<long double>          long_double_init_t;
00435 
00436 
00437 
00438 
00439 
00440 inline bool operator !(bool_init_t const& b)
00441 {
00442     return !b.value;
00443 }
00444 
00445 
00446 
00447 template<   ss_typename_param_k T
00448         >
00449 inline must_init<T>& operator ++(must_init<T> &v)
00450 {
00451     ++v.base_type_value();
00452 
00453     return v;
00454 }
00455 
00456 
00457 
00458 template<   ss_typename_param_k T
00459         >
00460 inline must_init<T> const operator ++(must_init<T> &v, int)
00461 {
00462     must_init<T>  r(v);
00463 
00464     v.base_type_value()++;
00465 
00466     return r;
00467 }
00468 
00469 
00470 
00471 template<   ss_typename_param_k T
00472         >
00473 inline must_init<T>& operator --(must_init<T> &v)
00474 {
00475     --v.base_type_value();
00476 
00477     return v;
00478 }
00479 
00480 
00481 
00482 template<   ss_typename_param_k T
00483         >
00484 inline must_init<T> const operator --(must_init<T> &v, int)
00485 {
00486     must_init<T>  r(v);
00487 
00488     v.base_type_value()--;
00489 
00490     return r;
00491 }
00492 
00493 
00494 
00495 template<   ss_typename_param_k T
00496         >
00497 inline ss_bool_t operator ==(must_init<T> const& lhs, must_init<T> const& rhs)
00498 {
00499     return lhs.base_type_value() == rhs.base_type_value();
00500 }
00501 
00502 template<   ss_typename_param_k T
00503         >
00504 inline ss_bool_t operator ==(must_init<T> const& lhs, T const& rhs)
00505 {
00506     return lhs.base_type_value() == rhs;
00507 }
00508 
00509 template<   ss_typename_param_k T
00510         >
00511 inline ss_bool_t operator ==(T const& lhs, must_init<T> const& rhs)
00512 {
00513     return lhs == rhs.base_type_value();
00514 }
00515 
00516 
00517 
00518 
00519 template<   ss_typename_param_k T
00520         >
00521 inline ss_bool_t operator !=(must_init<T> const& lhs, must_init<T> const& rhs)
00522 {
00523     return ! operator ==(lhs, rhs);
00524 }
00525 
00526 template<   ss_typename_param_k T
00527         >
00528 inline ss_bool_t operator !=(must_init<T> const& lhs, T const& rhs)
00529 {
00530     return ! operator ==(lhs, rhs);
00531 }
00532 
00533 template<   ss_typename_param_k T
00534         >
00535 inline ss_bool_t operator !=(T const& lhs, must_init<T> const& rhs)
00536 {
00537     return ! operator ==(lhs, rhs);
00538 }
00539 
00540 
00541 
00542 template<   ss_typename_param_k T
00543         >
00544 inline ss_bool_t operator <(must_init<T> const& lhs, must_init<T> const& rhs)
00545 {
00546     return lhs.base_type_value() < rhs.base_type_value();
00547 }
00548 
00549 template<   ss_typename_param_k T
00550         >
00551 inline ss_bool_t operator <(must_init<T> const& lhs, T const& rhs)
00552 {
00553     return lhs.base_type_value() < rhs;
00554 }
00555 
00556 template<   ss_typename_param_k T
00557         >
00558 inline ss_bool_t operator <(T const& lhs, must_init<T> const& rhs)
00559 {
00560     return lhs < rhs.base_type_value();
00561 }
00562 
00563 
00564 
00565 template<   ss_typename_param_k T
00566         >
00567 inline ss_bool_t operator <=(must_init<T> const& lhs, must_init<T> const& rhs)
00568 {
00569     return lhs.base_type_value() <= rhs.base_type_value();
00570 }
00571 
00572 template<   ss_typename_param_k T
00573         >
00574 inline ss_bool_t operator <=(must_init<T> const& lhs, T const& rhs)
00575 {
00576     return lhs.base_type_value() <= rhs;
00577 }
00578 
00579 template<   ss_typename_param_k T
00580         >
00581 inline ss_bool_t operator <=(T const& lhs, must_init<T> const& rhs)
00582 {
00583     return lhs <= rhs.base_type_value();
00584 }
00585 
00586 
00587 
00588 template<   ss_typename_param_k T
00589         >
00590 inline ss_bool_t operator >(must_init<T> const& lhs, must_init<T> const& rhs)
00591 {
00592     return lhs.base_type_value() > rhs.base_type_value();
00593 }
00594 
00595 
00596 #ifdef __SYNSOFT_DBS_COMPILER_SUPPORTS_PRAGMA_MESSAGE
00597 # pragma message(_sscomp_fileline_message("This had to be changed to T + T2, so as to allow comparison between different integral types"))
00598 #endif 
00599 
00600 template<   ss_typename_param_k T
00601         ,   ss_typename_param_k T2
00602         >
00603 inline ss_bool_t operator >(must_init<T> const& lhs, T2 const& rhs)
00604 {
00605     return lhs.base_type_value() > rhs;
00606 }
00607 
00608 template<   ss_typename_param_k T
00609         >
00610 inline ss_bool_t operator >(T const& lhs, must_init<T> const& rhs)
00611 {
00612     return lhs > rhs.base_type_value();
00613 }
00614 
00615 
00616 
00617 template<   ss_typename_param_k T
00618         >
00619 inline ss_bool_t operator >=(must_init<T> const& lhs, must_init<T> const& rhs)
00620 {
00621     return lhs.base_type_value() >= rhs.base_type_value();
00622 }
00623 
00624 template<   ss_typename_param_k T
00625         >
00626 inline ss_bool_t operator >=(must_init<T> const& lhs, T const& rhs)
00627 {
00628     return lhs.base_type_value() >= rhs;
00629 }
00630 
00631 template<   ss_typename_param_k T
00632         >
00633 inline ss_bool_t operator >=(T const& lhs, must_init<T> const& rhs)
00634 {
00635     return lhs >= rhs.base_type_value();
00636 }
00637 
00638 
00639 
00640 #if 0
00641 template<   ss_typename_param_k T
00642         >
00643 inline must_init<T> operator +(must_init<T> const& lhs, must_init<T> const& rhs)
00644 {
00645     return must_init<T>(lhs.base_type_value() + rhs.base_type_value());
00646 }
00647 #endif 
00648 
00649 #if 0
00650 template<   ss_typename_param_k T
00651         >
00652 inline must_init<T> operator +(must_init<T> const& lhs, T const& rhs)
00653 {
00654     return must_init<T>(lhs.base_type_value() + rhs);
00655 }
00656 #else 
00657 template<   ss_typename_param_k T
00658         ,   ss_typename_param_k T2
00659         >
00660 inline must_init<T> operator +(must_init<T> const& lhs, T2 const& rhs)
00661 {
00662     return must_init<T>(lhs.base_type_value() + rhs);
00663 }
00664 
00665 #endif 
00666 
00667 #if 0
00668 template<   ss_typename_param_k T
00669         >
00670 inline must_init<T> operator +(T const& lhs, must_init<T> const& rhs)
00671 {
00672     return must_init<T>(lhs + rhs.base_type_value());
00673 }
00674 #else 
00675 template<   ss_typename_param_k T
00676         ,   ss_typename_param_k T2
00677         >
00678 inline must_init<T> operator +(T const& lhs, must_init<T> const& rhs)
00679 {
00680     return must_init<T>(lhs + rhs.base_type_value());
00681 }
00682 #endif 
00683 
00684 
00685 
00686 template<   ss_typename_param_k T
00687         >
00688 inline must_init<T> operator -(must_init<T> const& lhs, must_init<T> const& rhs)
00689 {
00690     return must_init<T>(lhs.base_type_value() - rhs.base_type_value());
00691 }
00692 
00693 template<   ss_typename_param_k T
00694         >
00695 inline must_init<T> operator -(must_init<T> const& lhs, T const& rhs)
00696 {
00697     return must_init<T>(lhs.base_type_value() - rhs);
00698 }
00699 
00700 template<   ss_typename_param_k T
00701         >
00702 inline must_init<T> operator -(T const& lhs, must_init<T> const& rhs)
00703 {
00704     return must_init<T>(lhs - rhs.base_type_value());
00705 }
00706 
00707 
00708 
00709 template<   ss_typename_param_k T
00710         >
00711 inline must_init<T> operator *(must_init<T> const& lhs, must_init<T> const& rhs)
00712 {
00713     return must_init<T>(lhs.base_type_value() * rhs.base_type_value());
00714 }
00715 
00716 template<   ss_typename_param_k T
00717         >
00718 inline must_init<T> operator *(must_init<T> const& lhs, T const& rhs)
00719 {
00720     return must_init<T>(lhs.base_type_value() * rhs);
00721 }
00722 
00723 template<   ss_typename_param_k T
00724         >
00725 inline must_init<T> operator *(T const& lhs, must_init<T> const& rhs)
00726 {
00727     return must_init<T>(lhs * rhs.base_type_value());
00728 }
00729 
00730 
00731 
00732 template<   ss_typename_param_k T
00733         >
00734 inline must_init<T> operator /(must_init<T> const& lhs, must_init<T> const& rhs)
00735 {
00736     return must_init<T>(lhs.base_type_value() / rhs.base_type_value());
00737 }
00738 
00739 template<   ss_typename_param_k T
00740         >
00741 inline must_init<T> operator /(must_init<T> const& lhs, T const& rhs)
00742 {
00743     return must_init<T>(lhs.base_type_value() / rhs);
00744 }
00745 
00746 
00747 template<   ss_typename_param_k T
00748         >
00749 inline must_init<T> operator /(T const& lhs, must_init<T> const& rhs)
00750 {
00751     return must_init<T>(lhs / rhs.base_type_value());
00752 }
00753 
00754 
00755 
00756 template<   ss_typename_param_k T
00757         >
00758 inline must_init<T> operator %(must_init<T> const& lhs, must_init<T> const& rhs)
00759 {
00760     return must_init<T>(lhs.base_type_value() % rhs.base_type_value());
00761 }
00762 
00763 template<   ss_typename_param_k T
00764         >
00765 inline must_init<T> operator %(must_init<T> const& lhs, T const& rhs)
00766 {
00767     return must_init<T>(lhs.base_type_value() % rhs);
00768 }
00769 
00770 template<   ss_typename_param_k T
00771         >
00772 inline must_init<T> operator %(T const& lhs, must_init<T> const& rhs)
00773 {
00774     return must_init<T>(lhs % rhs.base_type_value());
00775 }
00776 
00777 
00778 
00779 template<   ss_typename_param_k T
00780         >
00781 inline must_init<T> operator ^(must_init<T> const& lhs, must_init<T> const& rhs)
00782 {
00783     return must_init<T>(lhs.base_type_value() ^ rhs.base_type_value());
00784 }
00785 
00786 template<   ss_typename_param_k T
00787         >
00788 inline must_init<T> operator ^(must_init<T> const& lhs, T const& rhs)
00789 {
00790     return must_init<T>(lhs.base_type_value() ^ rhs);
00791 }
00792 
00793 template<   ss_typename_param_k T
00794         >
00795 inline must_init<T> operator ^(T const& lhs, must_init<T> const& rhs)
00796 {
00797     return must_init<T>(lhs ^ rhs.base_type_value());
00798 }
00799 
00800 
00801 
00802 template<   ss_typename_param_k T
00803         >
00804 inline must_init<T> operator ~(must_init<T> const& v)
00805 {
00806     return must_init<T>(~v.base_type_value());
00807 }
00808 
00809 
00810 
00811 template<   ss_typename_param_k T
00812         >
00813 inline must_init<T> operator <<(must_init<T> const& lhs, must_init<T> const& rhs)
00814 {
00815     return must_init<T>(lhs.base_type_value() << rhs.base_type_value());
00816 }
00817 
00818 template<   ss_typename_param_k T
00819         >
00820 inline must_init<T> operator <<(must_init<T> const& lhs, T const& rhs)
00821 {
00822     return must_init<T>(lhs.base_type_value() << rhs);
00823 }
00824 
00825 template<   ss_typename_param_k T
00826         >
00827 inline must_init<T> operator <<(T const& lhs, must_init<T> const& rhs)
00828 {
00829     return must_init<T>(lhs << rhs.base_type_value());
00830 }
00831 
00832 
00833 
00834 template<   ss_typename_param_k T
00835         >
00836 inline must_init<T> operator >>(must_init<T> const& lhs, must_init<T> const& rhs)
00837 {
00838     return must_init<T>(lhs.base_type_value() >> rhs.base_type_value());
00839 }
00840 
00841 template<   ss_typename_param_k T
00842         >
00843 inline must_init<T> operator >>(must_init<T> const& lhs, T const& rhs)
00844 {
00845     return must_init<T>(lhs.base_type_value() >> rhs);
00846 }
00847 
00848 template<   ss_typename_param_k T
00849         >
00850 inline must_init<T> operator >>(T const& lhs, must_init<T> const& rhs)
00851 {
00852     return must_init<T>(lhs >> rhs.base_type_value());
00853 }
00854 
00855 
00856 
00857 template<   ss_typename_param_k T
00858         >
00859 inline must_init<T> operator &(must_init<T> const& lhs, must_init<T> const& rhs)
00860 {
00861     return must_init<T>(lhs.base_type_value() & rhs.base_type_value());
00862 }
00863 
00864 template<   ss_typename_param_k T
00865         >
00866 inline must_init<T> operator &(must_init<T> const& lhs, T const& rhs)
00867 {
00868     return must_init<T>(lhs.base_type_value() & rhs);
00869 }
00870 
00871 template<   ss_typename_param_k T
00872         >
00873 inline must_init<T> operator &(T const& lhs, must_init<T> const& rhs)
00874 {
00875     return must_init<T>(lhs & rhs.base_type_value());
00876 }
00877 
00878 
00879 
00880 template<   ss_typename_param_k T
00881         >
00882 inline must_init<T> operator |(must_init<T> const& lhs, must_init<T> const& rhs)
00883 {
00884     return must_init<T>(lhs.base_type_value() | rhs.base_type_value());
00885 }
00886 
00887 template<   ss_typename_param_k T
00888         >
00889 inline must_init<T> operator |(must_init<T> const& lhs, T const& rhs)
00890 {
00891     return must_init<T>(lhs.base_type_value() | rhs);
00892 }
00893 
00894 template<   ss_typename_param_k T
00895         >
00896 inline must_init<T> operator |(T const& lhs, must_init<T> const& rhs)
00897 {
00898     return must_init<T>(lhs | rhs.base_type_value());
00899 }
00900 
00901 
00902 
00903 template<   ss_typename_param_k T
00904         >
00905 inline must_init<T> const& operator +=(must_init<T> &v, T const& rhs)
00906 {
00907     v.base_type_value() += rhs;
00908 
00909     return v;
00910 }
00911 
00912 template<   ss_typename_param_k T
00913         >
00914 inline must_init<T> const& operator +=(must_init<T> &v, must_init<T> const& rhs)
00915 {
00916     v.base_type_value() += rhs.base_type_value();
00917 
00918     return v;
00919 }
00920 
00921 
00922 
00923 template<   ss_typename_param_k T
00924         >
00925 inline must_init<T> const& operator -=(must_init<T> &v, T const& rhs)
00926 {
00927     v.base_type_value() -= rhs;
00928 
00929     return v;
00930 }
00931 
00932 template<   ss_typename_param_k T
00933         >
00934 inline must_init<T> const& operator -=(must_init<T> &v, must_init<T> const& rhs)
00935 {
00936     v.base_type_value() -= rhs.base_type_value();
00937 
00938     return v;
00939 }
00940 
00941 
00942 
00943 template<   ss_typename_param_k T
00944         >
00945 inline must_init<T> const& operator *=(must_init<T> &v, T const& rhs)
00946 {
00947     v.base_type_value() *= rhs;
00948 
00949     return v;
00950 }
00951 
00952 template<   ss_typename_param_k T
00953         >
00954 inline must_init<T> const& operator *=(must_init<T> &v, must_init<T> const& rhs)
00955 {
00956     v.base_type_value() *= rhs.base_type_value();
00957 
00958     return v;
00959 }
00960 
00961 
00962 
00963 template<   ss_typename_param_k T
00964         >
00965 inline must_init<T> const& operator /=(must_init<T> &v, T const& rhs)
00966 {
00967     v.base_type_value() /= rhs;
00968 
00969     return v;
00970 }
00971 
00972 template<   ss_typename_param_k T
00973         >
00974 inline must_init<T> const& operator /=(must_init<T> &v, must_init<T> const& rhs)
00975 {
00976     v.base_type_value() /= rhs.base_type_value();
00977 
00978     return v;
00979 }
00980 
00981 
00982 
00983 template<   ss_typename_param_k T
00984         >
00985 inline must_init<T> const& operator %=(must_init<T> &v, T const& rhs)
00986 {
00987     v.base_type_value() %= rhs;
00988 
00989     return v;
00990 }
00991 
00992 template<   ss_typename_param_k T
00993         >
00994 inline must_init<T> const& operator %=(must_init<T> &v, must_init<T> const& rhs)
00995 {
00996     v.base_type_value() %= rhs.base_type_value();
00997 
00998     return v;
00999 }
01000 
01001 
01002 
01003 template<   ss_typename_param_k T
01004         >
01005 inline must_init<T> const& operator ^=(must_init<T> &v, T const& rhs)
01006 {
01007     v.base_type_value() ^= rhs;
01008 
01009     return v;
01010 }
01011 
01012 template<   ss_typename_param_k T
01013         >
01014 inline must_init<T> const& operator ^=(must_init<T> &v, must_init<T> const& rhs)
01015 {
01016     v.base_type_value() ^= rhs.base_type_value();
01017 
01018     return v;
01019 }
01020 
01021 
01022 
01023 template<   ss_typename_param_k T
01024         >
01025 inline must_init<T> const& operator <<=(must_init<T> &v, T const& rhs)
01026 {
01027     v.base_type_value() <<= rhs;
01028 
01029     return v;
01030 }
01031 
01032 template<   ss_typename_param_k T
01033         >
01034 inline must_init<T> const& operator <<=(must_init<T> &v, must_init<T> const& rhs)
01035 {
01036     v.base_type_value() <<= rhs.base_type_value();
01037 
01038     return v;
01039 }
01040 
01041 
01042 
01043 template<   ss_typename_param_k T
01044         >
01045 inline must_init<T> const& operator >>=(must_init<T> &v, T const& rhs)
01046 {
01047     v.base_type_value() >>= rhs;
01048 
01049     return v;
01050 }
01051 
01052 template<   ss_typename_param_k T
01053         >
01054 inline must_init<T> const& operator >>=(must_init<T> &v, must_init<T> const& rhs)
01055 {
01056     v.base_type_value() >>= rhs.base_type_value();
01057 
01058     return v;
01059 }
01060 
01061 
01062 
01063 template<   ss_typename_param_k T
01064         >
01065 inline must_init<T> const& operator &=(must_init<T> &v, T const& rhs)
01066 {
01067     v.base_type_value() &= rhs;
01068 
01069     return v;
01070 }
01071 
01072 template<   ss_typename_param_k T
01073         >
01074 inline must_init<T> const& operator &=(must_init<T> &v, must_init<T> const& rhs)
01075 {
01076     v.base_type_value() &= rhs.base_type_value();
01077 
01078     return v;
01079 }
01080 
01081 
01082 
01083 template<   ss_typename_param_k T
01084         >
01085 inline must_init<T> const& operator |=(must_init<T> &v, T const& rhs)
01086 {
01087     v.base_type_value() |= rhs;
01088 
01089     return v;
01090 }
01091 
01092 template<   ss_typename_param_k T
01093         >
01094 inline must_init<T> const& operator |=(must_init<T> &v, must_init<T> const& rhs)
01095 {
01096     v.base_type_value() |= rhs.base_type_value();
01097 
01098     return v;
01099 }
01100 
01102 
01103 
01104 #ifdef STLSOFT_UNITTEST
01105 # include "./unittest/must_init_unittest_.h"
01106 #endif 
01107 
01108 
01109 
01110 #ifndef _STLSOFT_NO_NAMESPACE
01111 } 
01112 #endif 
01113 
01114 
01115 
01116 #endif 
01117 
01118