mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-19 13:39:31 +03:00
fixed formatting and typo
This commit is contained in:
parent
82e9f4a009
commit
a8ec04ab4b
1 changed files with 2 additions and 2 deletions
|
@ -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); }
|
const_pointer address(const_reference x) const mi_attr_noexcept { return std::addressof(x); }
|
||||||
#else
|
#else
|
||||||
// Oversimplified implementation as presented here: <https://en.cppreference.com/w/cpp/memory/addressof>
|
// 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))); }
|
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))); }
|
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
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue