Skip to content

[MSVC] Cppcoro failed to build due to error C2280 with msvc on Windows #81

@Zhaojun-Liu

Description

@Zhaojun-Liu

Hi,
Cppcoro failed to build due to the below error with msvc on Windows, could you look at this issue? Thanks.

F:\gitP\andreasbuhr\cppcoro\test\generator_tests.cpp(242,3): error C2280: 'cppcoro::generator<`anonymous-namespace'::concat::value_type>::generator(const cppcoro::generator<`anonymous-namespace'::concat::value_type> &)': attempting to reference a deleted function [F:\gitP\andreasbuhr\cppcoro\build_amd64\test\generator_tests.vcxproj]

Repro steps:

  1. git -C "F:\gitP" clone https://github.com/andreasbuhr/cppcoro andreasbuhr\cppcoro
  2. git -C "F:\gitP\andreasbuhr\cppcoro" checkout e86216e
  3. mkdir F:\gitP\andreasbuhr\cppcoro\build_amd64 & cd F:\gitP\andreasbuhr\cppcoro\build_amd64
  4. cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DBUILD_TESTING=ON ..
  5. msbuild /m /p:Platform=x64 /p:Configuration=Release cppcoro.sln /t:Rebuild

Expected result:
build pass.

Actual log
cppcoro_build.log

More:
Our developers created a smaller repro, and both clang and gcc give the same error, you can see https://gcc.godbolt.org/z/h8fzvWWEj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions