2010-05-11 21:42:16 +02:00
|
|
|
#ifndef REP_H
|
|
|
|
#define REP_H
|
|
|
|
|
|
|
|
class Rep
|
|
|
|
{
|
|
|
|
int data_;
|
|
|
|
public:
|
2012-07-13 21:17:27 +02:00
|
|
|
_LIBCPP_CONSTEXPR Rep() : data_(-1) {}
|
|
|
|
explicit _LIBCPP_CONSTEXPR Rep(int i) : data_(i) {}
|
2010-05-11 21:42:16 +02:00
|
|
|
|
2012-07-13 21:17:27 +02:00
|
|
|
bool _LIBCPP_CONSTEXPR operator==(int i) const {return data_ == i;}
|
|
|
|
bool _LIBCPP_CONSTEXPR operator==(const Rep& r) const {return data_ == r.data_;}
|
2010-05-11 21:42:16 +02:00
|
|
|
|
|
|
|
Rep& operator*=(Rep x) {data_ *= x.data_; return *this;}
|
|
|
|
Rep& operator/=(Rep x) {data_ /= x.data_; return *this;}
|
|
|
|
};
|
|
|
|
|
2010-08-22 02:59:46 +02:00
|
|
|
#endif // REP_H
|