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
|
@ -368,7 +368,7 @@ mi_decl_export void* mi_new_reallocn(void* p, size_t newcount, size_t size) mi_a
|
||||||
#if (__cplusplus >= 201103L) || (_MSC_VER > 1900) // C++11
|
#if (__cplusplus >= 201103L) || (_MSC_VER > 1900) // C++11
|
||||||
#include <type_traits> // std::true_type
|
#include <type_traits> // std::true_type
|
||||||
#include <utility> // std::forward
|
#include <utility> // std::forward
|
||||||
#include <memory> // std::addressof
|
#include <memory> // std::addressof
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<class T> struct mi_stl_allocator {
|
template<class T> struct mi_stl_allocator {
|
||||||
|
@ -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