Files
gcc-reflection/libstdc++-v3/include/std/random
1nfocalypse 1c06243e65 libstdc++: Implement Philox Engine (PR119794)
Conforms with errata LWG4143, LWG4153 for Philox Engine.

	PR libstdc++/119794

libstdc++-v3/ChangeLog:

	* include/bits/random.h (philox_engine): Define.
	* include/bits/random.tcc (philox_engine): Define member
	functions.
	* include/bits/version.def (philox_engine): New macro.
	* include/bits/version.h: Regenerated.
	* include/std/random: Define __glibcxx_want_philox_engine and
	include <bits/version.h>.
	* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
	line number.
	* testsuite/26_numerics/random/philox4x32.cc: New test.
	* testsuite/26_numerics/random/philox4x64.cc: New test.
	* testsuite/26_numerics/random/philox_engine/cons/119794.cc: New test.
	* testsuite/26_numerics/random/philox_engine/cons/copy.cc: New test.
	* testsuite/26_numerics/random/philox_engine/cons/default.cc: New test.
	* testsuite/26_numerics/random/philox_engine/cons/seed.cc: New test.
	* testsuite/26_numerics/random/philox_engine/cons/seed_seq.cc: New test.
	* testsuite/26_numerics/random/philox_engine/operators/equal.cc: New test.
	* testsuite/26_numerics/random/philox_engine/operators/inequal.cc: New test.
	* testsuite/26_numerics/random/philox_engine/operators/serialize.cc: New test.
	* testsuite/26_numerics/random/philox_engine/requirements/constants.cc: New test.
	* testsuite/26_numerics/random/philox_engine/requirements/constexpr_data.cc: New test.
	* testsuite/26_numerics/random/philox_engine/requirements/constexpr_functions.cc: New test.
	* testsuite/26_numerics/random/philox_engine/requirements/typedefs.cc: New test.
2025-09-23 16:38:29 +01:00

60 lines
1.7 KiB
C++

// <random> -*- C++ -*-
// Copyright (C) 2007-2025 Free Software Foundation, Inc.
//
// 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.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file include/random
* This is a Standard C++ Library header.
*/
#ifndef _GLIBCXX_RANDOM
#define _GLIBCXX_RANDOM 1
#ifdef _GLIBCXX_SYSHDR
#pragma GCC system_header
#endif
#include <bits/requires_hosted.h> // OS-dependent random
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else
#define __glibcxx_want_philox_engine
#include <bits/version.h>
#include <cmath>
#include <cstdint> // For uint_fast32_t, uint_fast64_t, uint_least32_t
#include <cstdlib>
#include <string>
#include <iosfwd>
#include <limits>
#include <debug/debug.h>
#include <type_traits>
#include <bits/random.h>
#include <bits/opt_random.h>
#include <bits/random.tcc>
#endif // C++11
#endif // _GLIBCXX_RANDOM