1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Description: Move mars-client to CXX Standard 17
Metview (+mars) uses an eckit that no longer compiles with Std 11.
Move the code to Standard 17, to match the rest of the bundle.
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2022-02-09
Forwarded: no
--- a/mars-client/CMakeLists.txt
+++ b/mars-client/CMakeLists.txt
@@ -14,7 +14,7 @@
project( mars_client LANGUAGES C CXX )
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#################################################################################################################################################################
--- a/mars-client/src/tools/cube.cc
+++ b/mars-client/src/tools/cube.cc
@@ -22,7 +22,7 @@
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-inline bool compare(const string& a, const string& b) {
+inline bool const compare(const string& a, const string& b) {
// if(a[0] >= '0' && a[0] <= '9' && b[0] >= '0' && b[0] <= '9')
// {
// return atof(a.c_str()) < atof(b.c_str());
@@ -31,7 +31,7 @@
}
struct compare_alnum {
- bool operator()(const string& a, const string& b) { return compare(a, b); }
+ bool const operator()(const string& a, const string& b) const { return compare(a, b); }
};
map<string, int> priorities;
|