summaryrefslogtreecommitdiff
path: root/libcxx/test/std/utilities/memory/pointer.conversion/to_address_on_funcptr.verify.cpp
blob: 4f4e05ce8c2a0e281b88e7b93737c51200095ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

// <memory>

// UNSUPPORTED: c++03, c++11, c++14, c++17

// template <class T> constexpr T* to_address(T* p) noexcept;
//     Mandates: T is not a function type.

#include <memory>

int (*pf)();

void test() {
    (void)std::to_address(pf); // expected-error@*:* {{is a function type}}
}