2// -----------------------------------------------------------------------------------------------------
3// Copyright (c) 2006-2023, Knut Reinert & Freie Universität Berlin
4// Copyright (c) 2016-2023, Knut Reinert & MPI für molekulare Genetik
5// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
6// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
7// -----------------------------------------------------------------------------------------------------
10 * \brief The [<new> header](https://en.cppreference.com/w/cpp/header/new) from C++17's standard library.
11 * \author Rene Rahn <rene.rahn AT fu-berlin.de>
14// File might be included from multiple libraries.
15#ifndef SEQAN_STD_NEW_SHIM
16#define SEQAN_STD_NEW_SHIM
20#ifndef __cpp_lib_hardware_interference_size
23 * \brief A subset of the C++20 standard library made available in pre-C++20 contexts.
27 * This module provides many parts of the C++20 standard library (and some parts of the C++17 standard library
28 * not available in GCC). They are only defined if not found in the compiler's standard library and are called exactly
29 * like the originals so they can be used interchangeably.
31 * \attention All of this sub-module is subject to change!
35 * * We do not provide all C++20 library features, only those that are used by SeqAn.
36 * * All of these might change or be removed once C++20 is published.
37 * * The documentation of this module will likely be removed entirely in favour of links to
38 * https://en.cppreference.com
40 * It is best you consider every entity in this module as:
46/*!\defgroup std_new new
48 * \brief The [<new> header](https://en.cppreference.com/w/cpp/header/new) from C++17's standard library.
54/*!\brief Minimum offset between two objects to avoid false sharing.
56 * \sa https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
58inline constexpr std::size_t hardware_destructive_interference_size = 64;
60/*!\brief Maximum size of contiguous memory to promote true sharing.
62 * \sa https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
64inline constexpr std::size_t hardware_constructive_interference_size = 64;
68#endif // __cpp_lib_hardware_interference_size
70#endif // SEQAN_STD_NEW_SHIM