mirror of
https://github.com/nlohmann/json.git
synced 2025-08-15 02:01:33 +03:00
Fix for gcc
This commit is contained in:
@@ -240,8 +240,7 @@ namespace
|
|||||||
template<class T>
|
template<class T>
|
||||||
struct allocator_no_forward : std::allocator<T>
|
struct allocator_no_forward : std::allocator<T>
|
||||||
{
|
{
|
||||||
using std::allocator<T>::allocator;
|
allocator_no_forward() {}
|
||||||
|
|
||||||
template <class U>
|
template <class U>
|
||||||
allocator_no_forward(allocator_no_forward<U>) {}
|
allocator_no_forward(allocator_no_forward<U>) {}
|
||||||
|
|
||||||
@@ -253,6 +252,7 @@ struct allocator_no_forward : std::allocator<T>
|
|||||||
template <class... Args>
|
template <class... Args>
|
||||||
void construct(T* p, const Args&... args)
|
void construct(T* p, const Args&... args)
|
||||||
{
|
{
|
||||||
|
// force copy even if move is available
|
||||||
::new (static_cast<void*>(p)) T(args...);
|
::new (static_cast<void*>(p)) T(args...);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user