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