boostorg / boostorg/hof

BOOST_HOF_LIFT doesn't work correctly on latest MSVC 14.2

Open
#220 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
509
Forks
94
PR merge metrics
No merged PRs in 30d

Description

https://godbolt.org/z/81bKWTx9M

Using BOOST_HOF_LIFT at function scope fails with

```
(14): error C2951: template declarations are only permitted at global, namespace, or class scope
(14): error C2892: a template cannot be a member of a local class
(15): fatal error C1506: unrecoverable block scoping error
```

whereas it works correctly under GCC and Clang. The reason is probably https://github.com/boostorg/hof/blob/0a28586156eb6cc7db1fbe74ae2a220daf40df14/include/boost/hof/lift.hpp#L89, which only checks whether `_MSC_VER` is defined, but not its value.

In addition, checking `_MSC_VER` before `__clang__` is wrong because clang-cl defines both.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.