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#ifndef TEST_STD_SHARED_PTR_RESET_H
9#define TEST_STD_SHARED_PTR_RESET_H
10
11#include <memory>
12#include <type_traits>
13
14template <class T, class... Args>
15std::false_type test_has_reset(...);
16
17template <class T, class... Args>
18typename std::enable_if<std::is_same<decltype(std::declval<T>().reset(std::declval<Args>()...)), void>::value,
19 std::true_type>::type
20test_has_reset(int);
21
22template <class T, class... Args>
23using HasReset = decltype(test_has_reset<T, Args...>(0));
24
25#endif // TEST_STD_SHARED_PTR_RESET_H
26

source code of libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_helper.h