143e42141SMarek Kurdej //===----------------------------------------------------------------------===// 243e42141SMarek Kurdej // 343e42141SMarek Kurdej // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 443e42141SMarek Kurdej // See https://llvm.org/LICENSE.txt for license information. 543e42141SMarek Kurdej // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 643e42141SMarek Kurdej // 743e42141SMarek Kurdej //===----------------------------------------------------------------------===// 843e42141SMarek Kurdej 98508b1c1SLouis Dionne // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20 1043e42141SMarek Kurdej 1143e42141SMarek Kurdej // [utility.underlying], to_underlying 1243e42141SMarek Kurdej // template <class T> 13*71400505SMark de Wever // constexpr underlying_type_t<T> to_underlying( T value ) noexcept; // C++23 1443e42141SMarek Kurdej 1543e42141SMarek Kurdej #include <utility> 1643e42141SMarek Kurdej 1743e42141SMarek Kurdej struct S {}; 1843e42141SMarek Kurdej f()1972f0edf3SLouis Dionnevoid f() { 2043e42141SMarek Kurdej std::to_underlying(125); // expected-error {{no matching function for call}} 2143e42141SMarek Kurdej std::to_underlying(S{}); // expected-error {{no matching function for call}} 2243e42141SMarek Kurdej } 23