mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
Fix boost::variant example to not forward args
boost::apply_visitor accepts its arguments by non-const lvalue reference, which fails to bind to an rvalue reference. Change the example to remove the argument forwarding.
This commit is contained in:
parent
391c75447d
commit
ebd6ad588b
@ -61,8 +61,8 @@ for custom variant types:
|
||||
struct visit_helper<boost::variant> {
|
||||
template <typename... Args>
|
||||
static auto call(Args &&...args)
|
||||
-> decltype(boost::apply_visitor(std::forward<Args>(args)...)) {
|
||||
return boost::apply_visitor(std::forward<Args>(args)...);
|
||||
-> decltype(boost::apply_visitor(args...)) {
|
||||
return boost::apply_visitor(args...);
|
||||
}
|
||||
};
|
||||
}} // namespace pybind11::detail
|
||||
|
Loading…
Reference in New Issue
Block a user