pack fold expression (c++17 extension) available when building with c++14
问题 The following code contains a fold expression, which afaiu is a c++17 feature: template <typename... T> static bool variable_length_or(const T ... v) { return (v || ...); } bool foo () { return variable_length_or(true, false, true, false); } what I find odd is that both g++ and clang++ seem to be fine with it when building with -std=c++14 (compiler-explorer). They do create a warning: <source>:2:16: warning: pack fold expression is a C++17 extension [-Wc++17-extensions] return (v || ...);