summaryrefslogtreecommitdiff
path: root/libcxx/test/std/utilities/memory/pointer.conversion/to_address_on_function.verify.cpp
blob: ee2306012eb6fb96cbb3efb1dbeac1716b38b7b6 (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 f();

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