Boost logo

Boost Users :

From: Qiang Ren (qiang.ren_at_[hidden])
Date: 2022-01-10 00:53:17


Hi, Mateusz,

I manually merge the chagelist and now it works fine.


Thank you very much.
Frank




________________________________
·¢¼þÈË: Boost-users <boost-users-bounces_at_[hidden]> ´ú±í Mateusz Loskot via Boost-users <boost-users_at_[hidden]>
·¢ËÍʱ¼ä: 2022Äê1ÔÂ8ÈÕ 4:09
ÊÕ¼þÈË: boost-users_at_[hidden] <boost-users_at_[hidden]>
³­ËÍ: Mateusz Loskot <mateusz_at_[hidden]>
Ö÷Ìâ: Re: [Boost-users] boost.gil build failed with GCC11 and -std=c++20

On Fri, 7 Jan 2022, 15:25 Qiang Ren via Boost-users, <boost-users_at_[hidden]<mailto:boost-users_at_[hidden]>> wrote:
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 >()
| ^


https://github.com/boostorg/gil/issues/616

Best regards,
Mateusz


<https://lists.boost.org/mailman/listinfo.cgi/boost-users>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net