Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libosrm: *Parameters do not perfectly forward to BaseParameters #2990

Open
daniel-j-h opened this issue Oct 3, 2016 · 2 comments
Open

libosrm: *Parameters do not perfectly forward to BaseParameters #2990

daniel-j-h opened this issue Oct 3, 2016 · 2 comments
Milestone

Comments

@daniel-j-h
Copy link
Member

daniel-j-h commented Oct 3, 2016

Our BaseParameters hold some potentially expensive vectors for coordinates, hints etc.

std::vector<util::Coordinate> coordinates;
std::vector<boost::optional<Hint>> hints;
std::vector<boost::optional<double>> radiuses;
std::vector<boost::optional<Bearing>> bearings;

RouteParameters and others then forward their arguments

but note this line: it's Args... args_ and not Args&&... args making the forward below useless. We always copy those arguments. Fixing this by adding && to all *Parameters breaks the API.

@daniel-j-h daniel-j-h added this to the 6.0 milestone Oct 3, 2016
@TheMarex
Copy link
Member

TheMarex commented Oct 3, 2016

@daniel-j-h this would break because a copy would become a move?

@daniel-j-h
Copy link
Member Author

Exactly. At the moment everything is a (potentially inefficient) copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants