diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-09 17:01:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-09 17:01:39 +0200 |
commit | ca4f43374643f3e1f16c7cb8d259e98311579e42 (patch) | |
tree | dc28d5b5a387739f99cf39af4a5ffd9fbdf7a331 | |
parent | a0f311248b6d2263a48c9c894b067d1e5761b2ed (diff) |
Make c++14 valid value for --std2.4.0
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | odb/cxx-lexer.cxx | 2 | ||||
-rw-r--r-- | odb/odb.cxx | 5 | ||||
-rw-r--r-- | odb/option-types.cxx | 3 | ||||
-rw-r--r-- | odb/option-types.hxx | 3 | ||||
-rw-r--r-- | odb/options.cli | 2 |
6 files changed, 14 insertions, 3 deletions
@@ -77,6 +77,8 @@ Version 2.4.0 names that are used by PostgreSQL. This can be useful, for example, to shorten names that exceed the PostgreSQL name limit. + * The --std option now accepts the 'c++14' value. + Version 2.3.0 * Support for database schema evolution, including schema migration, data diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx index fea05d7..7029c7e 100644 --- a/odb/cxx-lexer.cxx +++ b/odb/cxx-lexer.cxx @@ -194,7 +194,7 @@ cxx_string_lexer () linemap_add (&line_map_, LC_ENTER, 0, "<memory>", 0); reader_ = cpp_create_reader ( - cxx_dialect == cxx0x + cxx_dialect == cxx0x // Nothing new for C++14. #if BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 6 ? CLK_CXX11 #else diff --git a/odb/odb.cxx b/odb/odb.cxx index c56e3ef..af60299 100644 --- a/odb/odb.cxx +++ b/odb/odb.cxx @@ -613,6 +613,11 @@ main (int argc, char* argv[]) args[3] = "-std=gnu++0x"; // gnu++11 was only added in GCC 4.7.0. break; } + case cxx_version::cxx14: + { + args[3] = "-std=gnu++14"; + break; + } } } diff --git a/odb/option-types.cxx b/odb/option-types.cxx index e003381..d7c2621 100644 --- a/odb/option-types.cxx +++ b/odb/option-types.cxx @@ -18,6 +18,7 @@ static const char* cxx_version_[] = { "c++98", "c++11" + "c++14" }; string cxx_version:: @@ -38,6 +39,8 @@ operator>> (istream& is, cxx_version& v) v = cxx_version::cxx98; else if (s == "c++11") v = cxx_version::cxx11; + else if (s == "c++14") + v = cxx_version::cxx14; else is.setstate (istream::failbit); } diff --git a/odb/option-types.hxx b/odb/option-types.hxx index ea2fae9..e320598 100644 --- a/odb/option-types.hxx +++ b/odb/option-types.hxx @@ -21,7 +21,8 @@ struct cxx_version enum value { cxx98, - cxx11 + cxx11, + cxx14 }; cxx_version (value v = value (0)) : v_ (v) {} diff --git a/odb/options.cli b/odb/options.cli index a65f9ba..cf278cb 100644 --- a/odb/options.cli +++ b/odb/options.cli @@ -311,7 +311,7 @@ class options { "<version>", "Specify the C++ standard that should be used during compilation. - Valid values are \cb{c++98} (default) and \cb{c++11}." + Valid values are \cb{c++98} (default), \cb{c++11}, and \cb{c++14}." }; // Diagnostics. |