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

C++17 removes random_shuffle breaks ceres-solver #373

Closed
NeroBurner opened this issue May 16, 2018 · 2 comments
Closed

C++17 removes random_shuffle breaks ceres-solver #373

NeroBurner opened this issue May 16, 2018 · 2 comments

Comments

@NeroBurner
Copy link
Contributor

NeroBurner commented May 16, 2018

Ceres-Solver with C++17 won't compile.

C++14 deprecates random_shuffle, C++17 removes random_shuffle
As replacement since C++11 std::shuffle is provided
Source: http://en.cppreference.com/w/cpp/algorithm/random_shuffle

In current master only schur_eliminator_impl.h seems to use random_shuffle

random_shuffle(chunks_.begin(), chunks_.end());

Since 282b8b5 ceres-solver requires at least C++11. Therefore this change should make no problems

CC: @norbertwenzel

@sandwichmaker
Copy link
Contributor

@NeroBurner that line can likely just be dropped. Please feel free to send a CL.

NeroBurner pushed a commit to NeroBurner/hunter that referenced this issue May 18, 2018
@norbertwenzel
Copy link
Contributor

@sandwichmaker you mean removing the chunk shuffling altogether or just replacing it with C++11's std::shuffle() with a proper random number generator?

keir pushed a commit that referenced this issue May 23, 2018
std::random_shuffle() is deprecated since C++14 and was removed in
C++17. At least MSVC with C++17 fails to compile this code, I assume
other compilers fail as well.

In a Github discussion (#373) Sameer Agarwal states this line can
likely be dropped and asks for a PR/CL.

#373

Change-Id: I78e04f36cba398769b8f90916edbdaf33884e7e1
NeroBurner pushed a commit to NeroBurner/ceres-solver that referenced this issue Dec 10, 2018
std::random_shuffle() is deprecated since C++14 and was removed in
C++17. At least MSVC with C++17 fails to compile this code, I assume
other compilers fail as well.

In a Github discussion (ceres-solver#373) Sameer Agarwal states this line can
likely be dropped and asks for a PR/CL.

ceres-solver#373

Change-Id: I78e04f36cba398769b8f90916edbdaf33884e7e1
NeroBurner pushed a commit to NeroBurner/ceres-solver that referenced this issue Dec 10, 2018
std::random_shuffle() is deprecated since C++14 and was removed in
C++17. At least MSVC with C++17 fails to compile this code, I assume
other compilers fail as well.

In a Github discussion (ceres-solver#373) Sameer Agarwal states this line can
likely be dropped and asks for a PR/CL.

ceres-solver#373

Change-Id: I78e04f36cba398769b8f90916edbdaf33884e7e1
NikolausDemmel pushed a commit to NikolausDemmel/ceres-solver that referenced this issue Aug 19, 2020
std::random_shuffle() is deprecated since C++14 and was removed in
C++17. At least MSVC with C++17 fails to compile this code, I assume
other compilers fail as well.

In a Github discussion (ceres-solver#373) Sameer Agarwal states this line can
likely be dropped and asks for a PR/CL.

ceres-solver#373

Change-Id: I78e04f36cba398769b8f90916edbdaf33884e7e1
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

3 participants