Skip to content

Boost failed with error C2892 when build with MSVC on windows #204

@QuellaZhang

Description

@QuellaZhang

Hi All,

We tried to build and run hof test for Boost with VS2017 Update 7 on Windows. It failed to build due to the error C2892. Could you please help take a look at this? Thank you!

Reproduce steps:

  1. git clone -c core.autocrlf=true --recursive https://github.com/boostorg/boost.git D:\Boost\src
  2. open a VS 2015 x86 command prompt and browse to D:\Boost\src
  3. .\bootstrap
  4. .\b2 headers variant=release --build-dir=..\out\x86rel address-model=32
  5. .\b2 variant=release --build-dir=..\out\x86rel address-model=32
  6. .\b2 -j4 variant=release --build-dir=..\out\x86rel libs\hof\test

Failures:
libs\hof\test\lift.cpp(42): error C2892: a template cannot be a member of a local class
libs\hof\test\lift.cpp(45): error C2892: a template cannot be a member of a local class
libs\hof\test\lift.cpp(46): error C2892: a template cannot be a member of a local class
libs\hof\test\lift.cpp(49): error C2892: a template cannot be a member of a local class
libs\hof\test\lift.cpp(50): error C2892: a template cannot be a member of a local class

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