| //===----------------------------------------------------------------------===// |
| // 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 |
| //===----------------------------------------------------------------------===// |
| #include "unique_ptr_test_helper.h" |
| void doTest(UPtr& p, bool ExpectTrue) { |
| typedef typename std::conditional<IsArray, int[], int>::type VT; |
| typedef std::unique_ptr<VT> U; |
| static_assert((std::is_constructible<bool, U>::value), ""); |
| static_assert((std::is_constructible<bool, U const&>::value), ""); |
| static_assert(!std::is_convertible<U, bool>::value, ""); |
| static_assert(!std::is_convertible<U const&, bool>::value, ""); |
| test_basic</*IsArray*/ false>(); |