Silence C++20 warning

This commit is contained in:
Nekotekina 2020-03-09 19:17:50 +03:00
parent cfb2b7e1ce
commit 60c69df968
2 changed files with 3 additions and 3 deletions

View File

@ -454,7 +454,7 @@ namespace cereal
template <class T> inline
ArchiveType & processImpl(DeferredData<T> const & d)
{
std::function<void(void)> deferment( [=](){ self->process( d.value ); } );
std::function<void(void)> deferment( [=, this](){ self->process( d.value ); } );
itsDeferments.emplace_back( std::move(deferment) );
return *self;
@ -859,7 +859,7 @@ namespace cereal
template <class T> inline
ArchiveType & processImpl(DeferredData<T> const & d)
{
std::function<void(void)> deferment( [=](){ self->process( d.value ); } );
std::function<void(void)> deferment( [=, this](){ self->process( d.value ); } );
itsDeferments.emplace_back( std::move(deferment) );
return *self;

View File

@ -297,7 +297,7 @@ namespace cereal
// uninitialized until initialized with placement new
using NonConstT = typename std::remove_const<T>::type;
std::shared_ptr<NonConstT> ptr(reinterpret_cast<NonConstT *>(new ST()),
[=]( NonConstT * t )
[=, this]( NonConstT * t )
{
if( *valid )
t->~T();