Revert "[libc] Breakup freelist_malloc into separate files" (#119749)
[llvm-project.git] / libcxx / test / std / utilities / memory / util.smartptr / util.smartptr.shared / util.smartptr.shared.mod / reset_helper.h
blob27d7264be172e884a53b764eb5eccf770765a314
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
11 #include <memory>
12 #include <type_traits>
14 template <class T, class... Args>
15 std::false_type test_has_reset(...);
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);
22 template <class T, class... Args>
23 using HasReset = decltype(test_has_reset<T, Args...>(0));
25 #endif // TEST_STD_SHARED_PTR_RESET_H