Hi,
I am on ubuntu 20.04, I have GCC9.4 and 10.3 and 11.1 installed.
I found that when set "-std=c++20", with gcc11, boost.gil will failed to build.
Here is the simple test cpp to reproduce the issue:
#include <sstream>
#include <boost/gil.hpp>
#include <boost/gil/extension/io/png.hpp>
namespace gil = boost::gil;
int main()
{
gil::rgb8_image_t img;
std::stringstream buf(std::ios::in | std::ios::out | std::ios::binary);
gil::read_and_convert_image(buf, img, gil::png_tag{});
return 0;
}
the build command is:
g++ -o test test_gcc11_gil.cc -std=c++20 -I${THIRD_PARTY}/boost/boost_1_78_0 -L${THIRD_PARTY}/libpng/1.6.37/lib/ -lpng
If replaced '-std=c++20' with '-std=c++17', the build would be OK, but with 'c++20', gcc 11 failed with the following errors:
In file included from /data/lin/ThirdParty/boost/boost_1_78_0/boost/gil/extension/io/png/read.hpp:13,
from /data/lin/ThirdParty/boost/boost_1_78_0/boost/gil/extension/io/png.hpp:11,
from test_gcc11_gil.cc:3:
/data/lin/ThirdParty/boost/boost_1_78_0/boost/gil/extension/io/png/tags.hpp:576:32: error: expected unqualified-id before ‘)’ token
576 | image_read_info< png_tag >()
| ^