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

Switch to C++14 under Boost 1.75.0 #49

Closed
eddelbuettel opened this issue Dec 13, 2020 · 6 comments
Closed

Switch to C++14 under Boost 1.75.0 #49

eddelbuettel opened this issue Dec 13, 2020 · 6 comments

Comments

@eddelbuettel
Copy link

As mentioned in issue 76 at the BH repo, its new version requires a switch of googlePolylines to C++14 and will no longer compile with C++11. I have checked that this works, and can confirm that C++14 is allowed at CRAN. I have not checked if the switch to C++14 causes and issue under the current BH package (using Boost 1.72.0).

It would be great if you could consider upgrading to C++14 and upload an updated package, likely only once CRAN reopens in January, A simple patch is included below.

Or, per your open issue #44, maybe you prefer to no longer use BH which is fine too. Either way, I would love to upgrade BH without breaking any dependents.

Please reach out if you have any questions, and a big Thank You! for maintaining googlePolylines on CRAN.

diff -ru googlePolylines.orig/DESCRIPTION googlePolylines/DESCRIPTION
--- googlePolylines.orig/DESCRIPTION    2020-11-01 06:30:19.000000000 +0100
+++ googlePolylines/DESCRIPTION 2020-12-12 22:35:22.793196326 +0100
@@ -12,7 +12,7 @@
     using the 'Google' polyline encoding algorithm (<https://developers.google.com/maps/documentation/utilities/polylinealgorithm>).
 License: MIT + file LICENSE
 Encoding: UTF-8
-SystemRequirements: C++11
+SystemRequirements: C++14
 Depends: R (>= 3.3.0)
 Imports: Rcpp (>= 0.12.13)
 LinkingTo: Rcpp, BH
diff -ru googlePolylines.orig/src/Makevars googlePolylines/src/Makevars
--- googlePolylines.orig/src/Makevars   2020-05-25 02:21:49.000000000 +0200
+++ googlePolylines/src/Makevars        2020-12-12 22:35:30.685619918 +0100
@@ -1,3 +1,3 @@
-CXX_STD = CXX11
+CXX_STD = CXX14
 
 PKG_CPPFLAGS = -I../inst/include
Only in googlePolylines/src: Makevars~
diff -ru googlePolylines.orig/src/Makevars.win googlePolylines/src/Makevars.win
--- googlePolylines.orig/src/Makevars.win       2020-05-25 02:21:49.000000000 +0200
+++ googlePolylines/src/Makevars.win    2020-12-13 15:33:56.057435649 +0100
@@ -1,3 +1,3 @@
-CXX_STD = CXX11
+CXX_STD = CXX14
 
 PKG_CPPFLAGS = -I../inst/include
@dcooley
Copy link
Collaborator

dcooley commented Dec 15, 2020

Thanks for checking it will still work @eddelbuettel, I'll get onto this very soon.

@eddelbuettel
Copy link
Author

"Should be" easy. Famous last words. Initial error messages were C++-standard-level scary, but I noticed a hint on C++03 / C++11 / C++14 and just by switching it behaved again.

Not my call to force a switch but hey, apparently that's the current price of playing with Boost geometry.

@eddelbuettel
Copy link
Author

BTW @Jean-Romain tested for his two packages that are similarly affected and the usual test benches at RHub / win-builder had no issues with his pair being switched.

@dcooley
Copy link
Collaborator

dcooley commented Dec 15, 2020

updated, tested and submitted - waiting on CRAN's response.

@dcooley
Copy link
Collaborator

dcooley commented Dec 15, 2020

on CRAN

@dcooley dcooley closed this as completed Dec 15, 2020
@eddelbuettel
Copy link
Author

Thanks so much, this will help upgrading BH, likely in early January.

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

2 participants