From d48027b835e19c97ad6af8721bd8643c8c180acf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Nov 2019 08:29:23 +0200 Subject: Recognize latest C (2x) and C++ (2b) standards --- libbuild2/cxx/init.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'libbuild2/cxx') diff --git a/libbuild2/cxx/init.cxx b/libbuild2/cxx/init.cxx index 4f2b5eb..851ea0c 100644 --- a/libbuild2/cxx/init.cxx +++ b/libbuild2/cxx/init.cxx @@ -225,18 +225,19 @@ namespace build2 ; else { - // Translate 11 to 0x, 14 to 1y, 17 to 1z, and 20 to 2a for - // compatibility with older versions of the compilers. + // Translate 11 to 0x, 14 to 1y, 17 to 1z, 20 to 2a, and 23 to 2b + // for compatibility with older versions of the compilers. // o = "-std="; - if (*v == "98") o += "c++98"; - else if (*v == "03") o += "c++03"; - else if (*v == "11") o += "c++0x"; - else if (*v == "14") o += "c++1y"; - else if (*v == "17") o += "c++1z"; + if (*v == "23") o += "c++2b"; else if (*v == "20") o += "c++2a"; - else o += *v; // In case the user specifies e.g., 'gnu++17'. + else if (*v == "17") o += "c++1z"; + else if (*v == "14") o += "c++1y"; + else if (*v == "11") o += "c++0x"; + else if (*v == "03") o += "c++03"; + else if (*v == "98") o += "c++98"; + else o += *v; // In case the user specifies `gnu++NN` or some such. } if (!o.empty ()) -- cgit v1.1