Re: [Mingw-w64-public] GCC issue with constexpr?

2019-01-13 Thread Liu Hao
在 2019/1/14 下午1:55, Liu Hao 写道: > 在 2019/1/14 上午6:46, Maarten Verhage 写道: > Your code is not valid. Clang++ rejects your snippet, too. > > The array-to-pointer conversion from an array of `const char` is not > allowed in a constant expression unless such an array is declared with > `constexpr` [1]

Re: [Mingw-w64-public] GCC issue with constexpr?

2019-01-13 Thread Liu Hao
在 2019/1/14 上午6:46, Maarten Verhage 写道: > Hi all, > > I might have found a bug in gcc or mingw, but I'm not really sure. > Generally: This program contains no mingw-w64-specific thing, so it is less likely to be a mingw-w64 issue. You should have sent this to the gcc-help mailing list which is m

[Mingw-w64-public] GCC issue with constexpr?

2019-01-13 Thread Maarten Verhage
Hi all, I might have found a bug in gcc or mingw, but I'm not really sure. For the following version: g++ (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 8.1.0 A short example: #include #include #include #include int main() { const char istr[] = "Hello"; std::array::length( istr )>