We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
目前的实现Func的构造函数的概念限定是正确的,但是不知道为啥vs2022这块飘红
然后我改成下面的实现就可以了
把 std::is_convertible_v<decltype(std::declval<C>()(std::declval<TArgs>()...)), R> 改成 std::is_convertible_v<std::invoke_result_t<C, TArgs...>, R> 就不飘红了
std::is_convertible_v<decltype(std::declval<C>()(std::declval<TArgs>()...)), R>
std::is_convertible_v<std::invoke_result_t<C, TArgs...>, R>
The text was updated successfully, but these errors were encountered:
我还不知道有这个type trait呢,正好最近来看看,如果能用的话我就不declval了。
declval
简单来说,VC++我记得intellisense用的是Edison Design Group的C++编译器,细节上跟cl和clang不一样的地方还不少,不过一般我只要这两个编译器都能编译我就满足了。
Sorry, something went wrong.
No branches or pull requests
目前的实现Func的构造函数的概念限定是正确的,但是不知道为啥vs2022这块飘红
然后我改成下面的实现就可以了
把
std::is_convertible_v<decltype(std::declval<C>()(std::declval<TArgs>()...)), R>
改成
std::is_convertible_v<std::invoke_result_t<C, TArgs...>, R>
就不飘红了
The text was updated successfully, but these errors were encountered: