由于哪个版本的 GCC 支持 C++14?

Since which version of GCC is C++14 supported?

我正在调查为什么这段代码可以在我装有 GCC v7.2 的 PC 上编译,但不能用我们工具链的 GCC v5.4 编译,尽管 -std=c++14 -Wpedantic -pedantic-errors 已通过:

#include <array>
#include <vector>
#include <tuple>
typedef std::tuple<const char *, const char *, bool> StrStrBool;

const std::vector<StrStrBool> cApIDValidTestValues {
{
    {"str1", "str2", true },
    { "str3", "str4",  false }
}
};

错误是:

<source>:12:1: error: converting to 'std::tuple<const char*, const char*, bool>' from initializer list would use explicit constructor 'constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const char (&)[5], const char (&)[5], bool}; <template-parameter-2-2> = void; _Elements = {const char*, const char*, bool}]' }; ^

此代码是 C++14 有效的(explanation), so according to GCC's Standards Support 页面——显示自 GCC v5 以来的完整 C++14 支持——我希望 GCC v5.4 能够编译它。

但是我在网上被告知,这个GCC版本的编译器似乎支持C++14,但是附带的libstdc++不兼容C++14。

我的相关问题是:

  1. 提供符合 C++14 的 libstdc++ 的最早 GCC 版本是什么?我如何找到其他标准的这一点?
  2. 为什么 GCC 会宣传它具有对 gcc 版本的 C++14 支持,但它附带的 libstdc++ 却没有?
  3. 这是否表示 gcc 编译器可以与其他 stdlib 实现一起使用?

This code is C++14 valid (explanation),

不,不是("explanation" 完全不相关)。

so according to GCC's Standards Support page--which shows full C++14 support since GCC v5

那个页面清楚地说 "For information about the status of the library implementation, please see this page." 但是 ...

--I expected GCC v5.4 to be able to compile it.

不,因为 5.4 不支持 C++17,特别是不支持添加到 C++ 标准草案 after[= 中的 "Improving pair and tuple" 功能24=] C++14 发布。该功能在 2015 年 5 月的会议上获得 C++ 委员会的批准,GCC 5.1 于 2015 年 4 月发布,该功能的更改过于具有侵入性,无法向后移植到 GCC 的稳定版本分支。库支持页面显示 libstdc++ 从 GCC 6.1 开始支持它。