From: John Maddock (jz.maddock_at_[hidden])
Date: 2020-10-30 18:17:56
On 30/10/2020 15:39, Thomas Ferrand via Boost wrote:
> Le 30/10/2020 Ã 15:16, Hans Dembinski via Boost a Ã©critÂ :
>>> On 30. Oct 2020, at 14:52, Hans Dembinski <hans.dembinski_at_[hidden]>
>>> Dear John and the other gurus,
>>> a strange bug was reported for Boost.Histogram. It is a difficult
>>> one for which I would like to ask for help. To me it looks like a
>>> bug in gcc.
>>> Here is the issue:
>> Here is an absolute minimal example which does not include boost at all.
>> clang is ok, msvc is ok, gcc fails.
A bit of messing about shows that:
* Returning T is OK.
* Returning std::size_t is OK
* Returning "unsigned int" is OK
* Returning "signed int" is OK
* Returning "unsigned" fails.
* Returning "signed" fails.
So is changing the return type to "unsigned int" a viable option?
Weird, and does look like a bug.
>> Unsubscribe & other changes:
> Not, an expert but I would say it looks like a gcc bug.
> As a workaround the function in the nested namespace can be declared
> with a trailing return type, this doesn't seem to trigger the bug:
> Unsubscribe & other changes:
-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk