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 
13 #include "test_macros.h"
14 
15 class Rep
16 {
17     int data_;
18 public:
Rep()19     TEST_CONSTEXPR Rep() : data_(-1) {}
Rep(int i)20     explicit TEST_CONSTEXPR Rep(int i) : data_(i) {}
21 
22     bool TEST_CONSTEXPR operator==(int i) const {return data_ == i;}
23     bool TEST_CONSTEXPR operator==(const Rep& r) const {return data_ == r.data_;}
24 
25     Rep& operator*=(Rep x) {data_ *= x.data_; return *this;}
26     Rep& operator/=(Rep x) {data_ /= x.data_; return *this;}
27 };
28 
29 #endif  // REP_H
30