| Home | Libraries | People | FAQ | More

## Class template absolute

boost::units::absolute

## Synopsis

    // In header: <boost/units/absolute.hpp>

    template<typename Y>
    class absolute {
    public:
      // types
      typedef absolute< Y > this_type;
      typedef Y             value_type;

      // construct/copy/destruct
      absolute();
      absolute(const value_type &);
      absolute(const this_type &);
      absolute& operator=(const this_type &);

      // public member functions
      const value_type & value() const;
      const this_type & operator+=(const value_type &);
      const this_type & operator-=(const value_type &);
    };

## Description

A wrapper to represent absolute units (points rather than vectors). Intended originally for temperatures, this class implements operators for absolute units so that addition of a relative unit to an absolute unit results in another absolute unit : absolute<T> +/- T -> absolute<T> and subtraction of one absolute unit from another results in a relative unit : absolute<T> - absolute<T> -> T.

### `absolute` public construct/copy/destruct

1.     absolute();

2.     absolute(const value_type & val);

3.     absolute(const this_type & source);

4.     absolute& operator=(const this_type & source);

### `absolute` public member functions

1.     const value_type & value() const;

2.     const this_type & operator+=(const value_type & val);

3.     const this_type & operator-=(const value_type & val);