improve type_traits and concepts #572
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added some things since the last pr #554
Most of them are based off of Clang's implementation
Added to
<type_traits>
:common_type
is_swappable is_nothrow_swappable
make_signed make_unsigned
common_reference basic_common_reference
(C++20)Added to
<concepts>
:common_reference_with
common_with
I did modify
std::move
andstd::swap
, so I'll need to do some additional testing before this gets merged.I also added the
<memory>
header, using__builtin_addressof
to implementaddressof
. This function is required for implementing<functional>
and a few other C++ headersTo make it easier to add Clang code to the toolchain, I've added the following to
<__config>
:_EZCXX_HIDDEN
_EZCXX_INTERNAL_LINKAGE
_EZCXX_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
_EZCXX_HIDE_FROM_ABI
_EZCXX_NODEBUG
_EZCXX_LIFETIMEBOUND
I also added
<source_location>
, which is the C++20 version of__FILE__
and__LINE__
Here is what is currently missing for C++17
<type_traits>