diff options
-rw-r--r-- | odb/odb.cxx | 5 | ||||
-rw-r--r-- | odb/option-types.cxx | 5 | ||||
-rw-r--r-- | odb/option-types.hxx | 3 | ||||
-rw-r--r-- | odb/options.cli | 6 |
4 files changed, 16 insertions, 3 deletions
diff --git a/odb/odb.cxx b/odb/odb.cxx index 9c9a175..701f6e1 100644 --- a/odb/odb.cxx +++ b/odb/odb.cxx @@ -707,6 +707,11 @@ main (int argc, char* argv[]) args[3] = "-std=c++1z"; break; } + case cxx_version::cxx20: + { + args[3] = "-std=c++2a"; + break; + } } } diff --git a/odb/option-types.cxx b/odb/option-types.cxx index aac0288..c4a030b 100644 --- a/odb/option-types.cxx +++ b/odb/option-types.cxx @@ -18,7 +18,8 @@ static const char* cxx_version_[] = "c++98", "c++11", "c++14", - "c++17" + "c++17", + "c++20" }; string cxx_version:: @@ -43,6 +44,8 @@ operator>> (istream& is, cxx_version& v) v = cxx_version::cxx14; else if (s == "c++17") v = cxx_version::cxx17; + else if (s == "c++20") + v = cxx_version::cxx20; else is.setstate (istream::failbit); } diff --git a/odb/option-types.hxx b/odb/option-types.hxx index 4739892..869fc83 100644 --- a/odb/option-types.hxx +++ b/odb/option-types.hxx @@ -22,7 +22,8 @@ struct cxx_version cxx98, cxx11, cxx14, - cxx17 + cxx17, + cxx20 }; cxx_version (value v = value (0)) : v_ (v) {} diff --git a/odb/options.cli b/odb/options.cli index bb8797b..17ee438 100644 --- a/odb/options.cli +++ b/odb/options.cli @@ -309,11 +309,15 @@ class options // Language. // + // @@ TODO: perhaps we should switch to latest to match how we build + // runtime by default? + // cxx_version --std = cxx_version::cxx98 { "<version>", "Specify the C++ standard that should be used during compilation. - Valid values are \cb{c++98} (default), \cb{c++11}, and \cb{c++14}." + Valid values are \cb{c++98} (default), \cb{c++11}, \cb{c++14}, + \cb{c++17}, and \cb{c++20}." }; // Diagnostics. |