mirror of
https://github.com/boostorg/unordered.git
synced 2026-04-28 18:02:21 +02:00
Don't track construction when using boost::tuple
Because it doesn't quiet work on C++11 compilers onwards.
This commit is contained in:
@@ -392,10 +392,10 @@ template <class T> class allocator1
|
||||
}
|
||||
|
||||
#if BOOST_UNORDERED_CXX11_CONSTRUCTION
|
||||
template <typename... Args> void construct(T* p, Args&&... args)
|
||||
template <typename U, typename... Args> void construct(U* p, Args&&... args)
|
||||
{
|
||||
detail::tracker.track_construct((void*)p, sizeof(T), tag_);
|
||||
new (p) T(boost::forward<Args>(args)...);
|
||||
detail::tracker.track_construct((void*)p, sizeof(U), tag_);
|
||||
new (p) U(boost::forward<Args>(args)...);
|
||||
}
|
||||
#else
|
||||
void construct(T* p, T const& t)
|
||||
@@ -405,10 +405,10 @@ template <class T> class allocator1
|
||||
}
|
||||
#endif
|
||||
|
||||
void destroy(T* p)
|
||||
template <typename U> void destroy(U* p)
|
||||
{
|
||||
detail::tracker.track_destroy((void*)p, sizeof(T), tag_);
|
||||
p->~T();
|
||||
detail::tracker.track_destroy((void*)p, sizeof(U), tag_);
|
||||
p->~U();
|
||||
|
||||
// Work around MSVC buggy unused parameter warning.
|
||||
ignore_variable(&p);
|
||||
|
||||
Reference in New Issue
Block a user