blob: 24f540c6a7fdc5be5b9e1f3a420b2162b43c8f41 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
#define TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H
struct PrivateConstructor {
PrivateConstructor static make ( int v ) { return PrivateConstructor(v); }
int get () const { return val; }
private:
PrivateConstructor ( int v ) : val(v) {}
int val;
};
bool operator < ( const PrivateConstructor &lhs, const PrivateConstructor &rhs ) { return lhs.get() < rhs.get(); }
bool operator < ( const PrivateConstructor &lhs, int rhs ) { return lhs.get() < rhs; }
bool operator < ( int lhs, const PrivateConstructor &rhs ) { return lhs < rhs.get(); }
#endif // TEST_SUPPORT_PRIVATE_CONSTRUCTOR_H