1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
10 #define TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
11 
12 struct PrivateConstructor {
13 
makePrivateConstructor14     PrivateConstructor static make ( int v ) { return PrivateConstructor(v); }
getPrivateConstructor15     int get () const { return val; }
16 private:
PrivateConstructorPrivateConstructor17     PrivateConstructor ( int v ) : val(v) {}
18     int val;
19     };
20 
21 bool operator < ( const PrivateConstructor &lhs, const PrivateConstructor &rhs ) { return lhs.get() < rhs.get(); }
22 
23 bool operator < ( const PrivateConstructor &lhs, int rhs ) { return lhs.get() < rhs; }
24 bool operator < ( int lhs, const PrivateConstructor &rhs ) { return lhs < rhs.get(); }
25 
26 #endif // TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
27