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_STD_UTILITIES_FUNCTION_OBJECTS_FUNC_BIND_PARTIAL_TYPES_H
10#define TEST_STD_UTILITIES_FUNCTION_OBJECTS_FUNC_BIND_PARTIAL_TYPES_H
11
12#include <tuple>
13#include <utility>
14
15struct MakeTuple {
16 template <class... Args>
17 constexpr auto operator()(Args&&... args) const {
18 return std::make_tuple(std::forward<Args>(args)...);
19 }
20};
21
22template <int X>
23struct Elem {
24 template <int Y>
25 constexpr bool operator==(const Elem<Y>&) const {
26 return X == Y;
27 }
28};
29
30struct CopyMoveInfo {
31 enum { none, copy, move } copy_kind;
32
33 constexpr CopyMoveInfo() : copy_kind(none) {}
34 constexpr CopyMoveInfo(const CopyMoveInfo&) : copy_kind(copy) {}
35 constexpr CopyMoveInfo(CopyMoveInfo&&) : copy_kind(move) {}
36};
37
38template <class T>
39T do_nothing(T t) {
40 return t;
41}
42
43#endif // TEST_STD_UTILITIES_FUNCTION_OBJECTS_FUNC_BIND_PARTIAL_TYPES_H
44

source code of libcxx/test/std/utilities/function.objects/func.bind.partial/types.h