1 //===----------------------------------------------------------------------===//
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
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
; }
17 PrivateConstructor ( int v
) : val(v
) {}
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