Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCTL failed with error C2988 C2059 C2334 when built by msvc on Windows #27

Closed
QuellaZhang opened this issue Jan 18, 2019 · 4 comments
Closed
Assignees

Comments

@QuellaZhang
Copy link

QuellaZhang commented Jan 18, 2019

DCTL failed with C2988 C2059 C2334 when built by msvc on Windows, I use source db7db34 on master branch. Could you help take a look at this? Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior.

Repro steps:

  1. git clone https://github.com/rhalbersma/dctl.git D:\DCTL\src
  2. open a VS 2017 amd64 command prompt as admin and browse to D:\DCTL
  3. git clone https://github.com/rhalbersma/xstd.git D:\DCTL\xstd
  4. git clone https://github.com/rhalbersma/bit_set.git D:\DCTL\bit_set
  5. put boost_1_67_0 under C:\boost_1_67_0\x64
  6. cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DBOOST_ROOT=C:\boost_1_67_0\x64\boost -DBOOST_INCLUDEDIR=C:\boost_1_67_0\x64 ..\src\
  7. msbuild /m /p:Configuration=Release;Platform=x64 dctl.sln /t:Rebuild

Failures:
D:\DCTL\src\include\dctl\core\board\basic_board.hpp(142,1): error C2988: unrecognizable template declaration/definition
XSTD_PP_CONSTEXPR_INTRINSIC static auto squares_filter(UnaryPredicate pred) noexcept
^
D:\DCTL\src\include\dctl\core\board\basic_board.hpp(301): note: see reference to class template instantiation 'dctl::core::block_adl::basic_board' being compiled
};
D:\DCTL\src\include\dctl\core\board\basic_board.hpp(142,1): error C2059: syntax error: 'constant'
XSTD_PP_CONSTEXPR_INTRINSIC static auto squares_filter(UnaryPredicate pred) noexcept
^
D:\DCTL\src\include\dctl\core\board\basic_board.hpp(143,1): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
{
^

@rhalbersma
Copy link
Owner

rhalbersma commented Jan 18, 2019

Thanks for reporting this. I am postponing full Visual Studio support until the following circumstances are met

  • CMake's next release supports a generator for Visual Studio 2019 (currently in their Git-master branch)
  • AppVeyor or vcpkg has that CMake version installed

Note that you probably also need at least Boost 1.68 for full Boost.Hana support.
I am in the middle of some refactoring to simplify some constructs that should be supported by Visual Studio. I expect this to be implemented in the coming two weeks (no promises!).

@rhalbersma rhalbersma self-assigned this Jan 18, 2019
@rhalbersma
Copy link
Owner

BTW, your compiler error is probably caused by the fact that the bit_set repo used to be named int_set and you probably have checked out dctl from a different date than the bit_set repo.

@QuellaZhang
Copy link
Author

This problem is no longer reproduced, so closed this issue.

@rhalbersma
Copy link
Owner

I finally managed to get this library to compile cleanly on AppVeyor using VS 2019 16.4, with a small backlog of silenced warnings that I will explore later.

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

No branches or pull requests

2 participants