Skip to content

Func的构造函数 requires的条件限定 #9

Description

@bizehao

目前的实现Func的构造函数的概念限定是正确的,但是不知道为啥vs2022这块飘红
image

然后我改成下面的实现就可以了

把
std::is_convertible_v<decltype(std::declval<C>()(std::declval<TArgs>()...)), R>
改成
std::is_convertible_v<std::invoke_result_t<C, TArgs...>, R>
就不飘红了

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