Skip to content

BOOST_HOF_LIFT doesn't work correctly on latest MSVC 14.2 #220

Description

@pdimov

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

Using BOOST_HOF_LIFT at function scope fails with

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

whereas it works correctly under GCC and Clang. The reason is probably

#if defined (_MSC_VER)
, 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions