Use std::move() instead of std::forward()

Std::forward() is intended to be used in reference-collapsing contexts
(i.e. templates). @Vultraz said in Discord that the code doesn't compile
with std::move(), but it compiles just fine for me with Visual Studio 2017.
This commit is contained in:
Jyrki Vesterinen 2017-11-14 20:48:35 +02:00
parent 3b81f06953
commit 468437666e

View File

@ -1429,7 +1429,7 @@ function_symbol_table::function_symbol_table(std::shared_ptr<function_symbol_tab
void function_symbol_table::add_function(const std::string& name, formula_function_ptr&& fcn)
{
custom_formulas_.emplace(name, std::forward<formula_function_ptr>(fcn));
custom_formulas_.emplace(name, std::move(fcn));
}
expression_ptr function_symbol_table::create_function(