Class template wrapping_intboost::date_time::wrapping_int — A wrapping integer used to support time durations (WARNING: only instantiate with a signed type). Synopsistemplate<typename int_type_, int_type_ wrap_val> class wrapping_int { public: // types typedef int_type_ int_type; // construct/copy/destruct wrapping_int(int_type); // public static functions static int_type wrap_value() ; // public member functions int_type as_int() const; operator int_type() const; int_type add(int_type) ; int_type subtract(int_type) ; // private member functions int_type calculate_wrap(int_type) ; }; DescriptionIn composite date and time types this type is used to wrap at the day boundary. Ex: A wrapping_int<short, 10> will roll over after nine, and roll under below zero. This gives a range of [0,9] NOTE: it is strongly recommended that wrapping_int2 be used instead of wrapping_int as wrapping_int is to be depricated at some point soon. Also Note that warnings will occur if instantiated with an unsigned type. Only a signed type should be used!
|