Open dcb314 opened 2 years ago
Recent development versions of gcc can be made to say:
src/rttr/../rttr/detail/registration/bind_impl.h:201:67: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
Source code is
m_ctor = create_constructor_wrapper<first_prop_policy>(std::move(get_metadata(std::forward<Args>(args)...)), std::move(get_default_args<type_list<Ctor_Args...>, constructor_type>(std::forward<Args>(args)...)), std::move(create_param_infos<type_list<Ctor_Args...>, constructor_type>(std::forward<Args>(args)...)));
More of the same at:
detail/registration/bind_impl.h:427:44: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] detail/registration/bind_impl.h:609:44: warning: moving a temporary object prevents copy elision [-Wpess imizing-move] detail/registration/bind_impl.h:520:44: warning: moving a temporary object prevents copy elision [-Wpess imizing-move]
A bit of code rewrite would have the code running faster, especially the first one. There are 108 cases of that.
Recent development versions of gcc can be made to say:
src/rttr/../rttr/detail/registration/bind_impl.h:201:67: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
Source code is
More of the same at:
detail/registration/bind_impl.h:427:44: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] detail/registration/bind_impl.h:609:44: warning: moving a temporary object prevents copy elision [-Wpess imizing-move] detail/registration/bind_impl.h:520:44: warning: moving a temporary object prevents copy elision [-Wpess imizing-move]
A bit of code rewrite would have the code running faster, especially the first one. There are 108 cases of that.