2025-01-02 11:59:57 +01:00
|
|
|
// Copyright (C) 2019-2025 Free Software Foundation, Inc.
|
2019-07-31 17:40:39 +01:00
|
|
|
//
|
|
|
|
// This file is part of the GNU ISO C++ Library. This library is free
|
|
|
|
// software; you can redistribute it and/or modify it under the
|
|
|
|
// terms of the GNU General Public License as published by the
|
|
|
|
// Free Software Foundation; either version 3, or (at your option)
|
|
|
|
// any later version.
|
|
|
|
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
|
|
// with this library; see the file COPYING3. If not see
|
|
|
|
// <http://www.gnu.org/licenses/>.
|
|
|
|
|
2023-09-15 14:27:56 +01:00
|
|
|
// { dg-do compile { target c++20 } }
|
2019-07-31 17:40:39 +01:00
|
|
|
|
|
|
|
#include <numbers>
|
|
|
|
|
|
|
|
struct D { double val; };
|
|
|
|
template<> inline constexpr D std::numbers::pi_v<D> = D{std::numbers::pi};
|
|
|
|
static_assert( std::numbers::pi_v<D>.val == std::numbers::pi );
|