forked from boostorg/endian
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add constexprs buffers - refs boostorg#54
* allows several operations on buffer types to be constexpr * ensure old execution path is still used at runtime, to avoid any performance regression Signed-off-by: Julien Blanc <[email protected]>
- Loading branch information
1 parent
be21291
commit afcf0b0
Showing
5 changed files
with
156 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef BOOST_ENDIAN_DETAIL_CONSTEXPR_HPP_INCLUDED | ||
#define BOOST_ENDIAN_DETAIL_CONSTEXPR_HPP_INCLUDED | ||
|
||
// Copyright 2024 Julien Blanc | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#if __cpp_lib_is_constant_evaluated >= 201802L && __cpp_lib_bit_cast >= 201806L | ||
#define BOOST_ENDIAN_CXX20_CONSTEXPR constexpr | ||
#define BOOST_ENDIAN_HAS_CXX20_CONSTEXPR 1 | ||
#else | ||
#define BOOST_ENDIAN_CXX20_CONSTEXPR inline | ||
#define BOOST_ENDIAN_HAS_CXX20_CONSTEXPR 0 | ||
#endif | ||
|
||
#endif // BOOST_ENDIAN_DETAIL_CONSTEXPR_HPP_INCLUDED |
Oops, something went wrong.