[Hana] "basic_tuple.hpp" bug when building with VS2017
Hello,
Just installed Boost and Visual Studio 2017 a few days ago.
Here is a bug when building with Hana's "basic_tuple.hpp" header with Visual Studio 2017: In basic_tuple.hpp:
template <>
struct drop_front_impl
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
participants (2)
-
Daniel Chen
-
Steven Watanabe