Boost logo

Boost :

Subject: Re: [boost] [Hana] "basic_tuple.hpp" bug when building with VS2017
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-05-20 13:22:25


AMDG

On 05/17/2018 11:59 AM, Daniel Chen via Boost wrote:
> <snip>
> Upon building with "basic_tuple.hpp", the line highlighted in green reports an error:
>
> "syntax error: unexpected token ')', expected 'id-expression'".
>
> Focus on the line above that one:
>
> N::value < len ? len - N::value : 0
>
> If you add parentheses, the error goes away:
>
> (N::value < len) ? len - N::value : 0
>
> <snip>
>
> I'm not sure if this is a Microsoft compiler issue (I will post to them as well), but I feel like someone should add those parentheses (and then some) to the line since it is safer - the "<" can be easily confused for a template bracket instead of a less-than sign by a parser.
>

According to the standard, it is not parsed as a template
unless you say `N::template value`. Are you using `/permissive-`?
That sometimes helps with these issues.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk