Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constexpr For pointer_traits<T*>::pointer_to() #397

Merged
merged 5 commits into from Jan 9, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion stl/inc/xutility
Expand Up @@ -118,7 +118,7 @@ struct pointer_traits<_Ty*> {

using _Reftype = conditional_t<is_void_v<_Ty>, char, _Ty>&;

_NODISCARD static pointer pointer_to(_Reftype _Val) noexcept {
_NODISCARD static _CONSTEXPR20 pointer pointer_to(_Reftype _Val) noexcept {
return _STD addressof(_Val);
}
};
Expand Down
2 changes: 2 additions & 0 deletions stl/inc/yvals_core.h
Expand Up @@ -159,6 +159,7 @@
// P0898R3 Standard Library Concepts
// P0919R3 Heterogeneous Lookup For Unordered Containers
// P0966R1 string::reserve() Should Not Shrink
// P1006R1 constexpr For pointer_traits<T*>::pointer_to()
// P1209R0 erase_if(), erase()
// P1227R2 Signed std::ssize(), Unsigned span::size()
// (partially implemented)
Expand Down Expand Up @@ -983,6 +984,7 @@
#endif // _HAS_STD_BOOLEAN
#endif // defined(__cpp_concepts) && __cpp_concepts > 201507L

#define __cpp_lib_constexpr_memory 201811L
#define __cpp_lib_endian 201907L
#define __cpp_lib_erase_if 201811L
#define __cpp_lib_generic_unordered_lookup 201811L
Expand Down