[OpenACC] Implement 'collapse' for combined constructs.
[llvm-project.git] / libcxx / test / support / private_constructor.h
blob24f540c6a7fdc5be5b9e1f3a420b2162b43c8f41
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 //===----------------------------------------------------------------------===//
9 #ifndef TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
10 #define TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
12 struct PrivateConstructor {
14 PrivateConstructor static make ( int v ) { return PrivateConstructor(v); }
15 int get () const { return val; }
16 private:
17 PrivateConstructor ( int v ) : val(v) {}
18 int val;
21 bool operator < ( const PrivateConstructor &lhs, const PrivateConstructor &rhs ) { return lhs.get() < rhs.get(); }
23 bool operator < ( const PrivateConstructor &lhs, int rhs ) { return lhs.get() < rhs; }
24 bool operator < ( int lhs, const PrivateConstructor &rhs ) { return lhs < rhs.get(); }
26 #endif // TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H