fixed formatting and typo

This commit is contained in:
RealKC 2020-01-24 21:36:35 +02:00 committed by GitHub
parent 82e9f4a009
commit a8ec04ab4b
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -412,7 +412,7 @@ template<class T> struct mi_stl_allocator {
const_pointer address(const_reference x) const mi_attr_noexcept { return std::addressof(x); }
#else
// Oversimplified implementation as presented here: <https://en.cppreference.com/w/cpp/memory/addressof>
// This is also used as a fallback by libcxx, and as the sole implementation by libstdcxx, so should be good enough for us
// This is also used as a fallback by libcxx, and as the sole implementation by libstdc++, so should be good enough for us
pointer address(reference x) const mi_attr_noexcept { return reinterpret_cast<pointer>(&const_cast<char&>(reinterpret_cast<const volatile char&>(x))); }
const_pointer address(const_reference x) const mi_attr_noexcept { return reinterpret_cast<const_pointer>(&const_cast<char&>(reinterpret_cast<const volatile char&>(x))); }
#endif