-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Use std::allocator_traits #3804
Conversation
e1c76ca
to
9c7f5ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I was hoping that SFINAE would be less cumbersome =). Considering how niche this feature is I think we should go back to your suggestion of using std::allocator_traits
pulled in transitively and fallback on ignoring max_size
on pre-C++11 systems.
@vitaut |
Great idea, let's do it. |
9c7f5ea
to
26bac2c
Compare
#include <stdexcept> // std::runtime_error | ||
#include <string> // std::string | ||
#include <system_error> // std::system_error | ||
#if defined(__GLIBCXX__) && !defined(_GLIBCXX_USE_DUAL_ABI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe __GLIBCXX__ < 20150422
instead of _GLIBCXX_USE_DUAL_ABI? https://stackoverflow.com/questions/37118114/value-of-glibcxx-for-each-libstdc-release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing dates won't work:
#2349 (comment)
26bac2c
to
ccd067c
Compare
Signed-off-by: Vladislav Shchapov <[email protected]>
ccd067c
to
dddff75
Compare
Thank you! |
Signed-off-by: Vladislav Shchapov <[email protected]>
Discussion: 872635d#r136913458
And fix MSVC warning.