1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is dual licensed under the MIT and the University of Illinois Open 6// Source Licenses. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef REP_H 11#define REP_H 12 13class Rep 14{ 15 int data_; 16public: 17 _LIBCPP_CONSTEXPR Rep() : data_(-1) {} 18 explicit _LIBCPP_CONSTEXPR Rep(int i) : data_(i) {} 19 20 bool _LIBCPP_CONSTEXPR operator==(int i) const {return data_ == i;} 21 bool _LIBCPP_CONSTEXPR operator==(const Rep& r) const {return data_ == r.data_;} 22 23 Rep& operator*=(Rep x) {data_ *= x.data_; return *this;} 24 Rep& operator/=(Rep x) {data_ /= x.data_; return *this;} 25}; 26 27#endif // REP_H 28