Remove building with NOCRYPTO option
[minix.git] / external / bsd / libc++ / dist / libcxx / test / support / DefaultOnly.h
bloba3d4303f8158af715fc0cd85c0b77e44ae661394
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 //===----------------------------------------------------------------------===//
10 #ifndef DEFAULTONLY_H
11 #define DEFAULTONLY_H
13 #include <cassert>
15 class DefaultOnly
17 int data_;
19 DefaultOnly(const DefaultOnly&);
20 DefaultOnly& operator=(const DefaultOnly&);
21 public:
22 static int count;
24 DefaultOnly() : data_(-1) {++count;}
25 ~DefaultOnly() {data_ = 0; --count;}
27 friend bool operator==(const DefaultOnly& x, const DefaultOnly& y)
28 {return x.data_ == y.data_;}
29 friend bool operator< (const DefaultOnly& x, const DefaultOnly& y)
30 {return x.data_ < y.data_;}
33 int DefaultOnly::count = 0;
35 #endif // DEFAULTONLY_H