Skip to content

Hana failed to build with error C2065, error C2977, error C2913... on MSVC #512

Open
@fangzhouxia

Description

@fangzhouxia

Describe
Hi all,
Hana failed to build with error C2065, error C2977, error C2913... on MSVC on windows. Could you please help look at this issue or provide some workarounds? Thanks in advance.

Steps to reproduce

  1. open VS2019 x64 tools command
  2. git clone https://github.com/boostorg/hana F:\gitP\boostorg\hana
  3. cd F:\gitP\boostorg\hana & mkdir build_amd64 & cd F:\gitP\boostorg\hana\build_amd64
  4. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DBOOST_ROOT=F:\tools\boost_1_70_0\x64\boost -DBOOST_INCLUDEDIR=F:\tools\boost_1_70_0\x64 -DCMAKE_CXX_FLAGS="/EHsc /Zc:ternary /bigobj" -DBOOST_HANA_ENABLE_STRING_UDL=false ..
  5. msbuild /m /p:Platform=x64 /p:Configuration=Release Boost.Hana.sln /t:Rebuild

log:
build (4).log
F:\gitP\boostorg\hana\example\adapt_adt.cpp(38,1): error C2065: 'name': undeclared identifier [F:\gitP\boostorg\hana\build_amd64\example\example.adapt_adt.vcxproj]
F:\gitP\boostorg\hana\example\adapt_adt.cpp(38,1): error C2977: 'boost::hana::accessors_impl': too many template arguments [F:\gitP\boostorg\hana\build_amd64\example\example.adapt_adt.vcxproj]
F:\gitP\boostorg\hana\example\adapt_adt.cpp(41,1): error C2913: explicit specialization; 'boost::hana::accessors_impl' is not a specialization of a class template [F:\gitP\boostorg\hana\build_amd64\example\example.adapt_adt.vcxproj]
F:\gitP\boostorg\hana\include\boost/hana/concept/struct.hpp(26,25): error C3203: 'accessors_impl': unspecialized class template can't be used as a template argument for template parameter 'Method', expected a real type [F:\gitP\boostorg\hana\build_amd64\example\example.adapt_adt.vcxproj]
F:\gitP\boostorg\hana\include\boost/hana/accessors.hpp(33,20): error C2825: 'Accessors': must be a class or namespace when followed by '::' [F:\gitP\boostorg\hana\build_amd64\example\example.adapt_adt.vcxproj]
40>F:\gitP\boostorg\hana\include\boost/hana/accessors.hpp(33,31): error C2510: 'Accessors': left of '::' must be a class/struct/union [F:\gitP\boostorg\hana\build_amd64\example\example.adapt_adt.vcxproj]
40>F:\gitP\boostorg\hana\include\boost/hana/accessors.hpp(33,1): error C3889: call to object of class type 'boost::hana::apply_t': no matching call operator found

Versions and configuration
VS version: VS2019(16.11.20)
Operating system: windows server 2019
The commit is 944f717

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