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

[Regression] boost::accumulators::tag::rolling_mean requires comparison operators < and > as of boost 1.71. #36

Open
thebrandre opened this issue Nov 11, 2019 · 0 comments

Comments

@thebrandre
Copy link

thebrandre commented Nov 11, 2019

Code that uses boost::accumulators::accumulator_set with<X, Stats> where Stats contains boost::accumulators::tag::rolling_mean and X does not implement the operators < and > no longer compiles since Fix #11437: correct immediate_rolling_mean.

We were using this for coordinates in 3d, let's say struct Vec3d { float x; float y; float z}; . This type doesn't have a natural order. (Note that lexicographic ordering does not respect rotation symmetries, etc.) So it doesn't make sense to define comparison operators for them.
Averaging, by contrast, is basically a linear combination, which is a perfectly valid operation for elements of vector spaces.

Code sample on godbolt. This code breaks when upgrading from boost-1.70 to boost -1.71.

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

No branches or pull requests

1 participant