In c++14 using static_cast
/ const_cast
:
[&best_string = static_cast<const std::string&>(best_string)](const string& s)
{
best_string = s; // fails
};
DEMO
In c++17 using std::as_const
:
[&best_string = std::as_const(best_string)](const string& s)
{
best_string = s; // fails
};
DEMO 2