1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
6 * \brief The [<new> header](https://en.cppreference.com/w/cpp/header/new) from C++17's standard library.
7 * \author Rene Rahn <rene.rahn AT fu-berlin.de>
10// File might be included from multiple libraries.
11#ifndef SEQAN_STD_NEW_SHIM
12#define SEQAN_STD_NEW_SHIM
16#ifndef __cpp_lib_hardware_interference_size
19 * \brief A subset of the C++20 standard library made available in pre-C++20 contexts.
23 * This module provides many parts of the C++20 standard library (and some parts of the C++17 standard library
24 * not available in GCC). They are only defined if not found in the compiler's standard library and are called exactly
25 * like the originals so they can be used interchangeably.
27 * \attention All of this sub-module is subject to change!
31 * * We do not provide all C++20 library features, only those that are used by SeqAn.
32 * * All of these might change or be removed once C++20 is published.
33 * * The documentation of this module will likely be removed entirely in favour of links to
34 * https://en.cppreference.com
36 * It is best you consider every entity in this module as:
42/*!\defgroup std_new new
44 * \brief The [<new> header](https://en.cppreference.com/w/cpp/header/new) from C++17's standard library.
50/*!\brief Minimum offset between two objects to avoid false sharing.
52 * \sa https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
54inline constexpr std::size_t hardware_destructive_interference_size = 64;
56/*!\brief Maximum size of contiguous memory to promote true sharing.
58 * \sa https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
60inline constexpr std::size_t hardware_constructive_interference_size = 64;
64#endif // __cpp_lib_hardware_interference_size
66#endif // SEQAN_STD_NEW_SHIM