Replace boost type_traits with stl type_traits.#1373
Replace boost type_traits with stl type_traits.#1373gogagum wants to merge 1 commit intoboostorg:developfrom
Conversation
| T * address() | ||
| { | ||
| return static_cast<T*>(m_storage.address()); | ||
| return static_cast<void*>(&m_storage); |
There was a problem hiding this comment.
std::aligned_storage is deprecated in C++23. AFAIR boost version is superior to the std one but I can't remember why besides the fact that it doesn't force us to cast address of the storage. A proposed replacement is something like this:
alignas(T) std::byte storage[sizeof(T)];
but it requires C++17 and would require careful testing. So I'd prefer to keep boost::aligned_storage for now.
There was a problem hiding this comment.
Btw, here https://en.cppreference.com/w/cpp/types/aligned_storage the required use of std::launder is mentioned. This change can introduce some unwanted effects. I guess I strongly suggest to keep the old version. :)
barendgehrels
left a comment
There was a problem hiding this comment.
Thanks! Looks good to me, one question to Adam
vissarion
left a comment
There was a problem hiding this comment.
Thanks, this look OK to me.
| T * address() | ||
| { | ||
| return static_cast<T*>(m_storage.address()); | ||
| return static_cast<void*>(&m_storage); |
There was a problem hiding this comment.
Btw, here https://en.cppreference.com/w/cpp/types/aligned_storage the required use of std::launder is mentioned. This change can introduce some unwanted effects. I guess I strongly suggest to keep the old version. :)
|
@gogagum will you update it or can we close it? (we still can remove the dependency later) |
|
@barendgehrels I am going to finish this work. |
With C++14, is possible to replace Boost.TypeTraits library usages with standard
type_traits. This PR removes direct Boost.TypeTraits dependency in Geometry module.