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

Fix build failure for clang #330

Merged
merged 1 commit into from
Jan 27, 2022
Merged

Conversation

MarcelNehring
Copy link
Contributor

This fixes a build failure with clang.

[ 78%] Building CXX object CMakeFiles/vcpkg-test.dir/src/vcpkg-test/mockcmakevarsprovider.cpp.o
In file included from /home/pi/repos/vcpkg-tool/src/vcpkg-test/mockcmakevarsprovider.cpp:1:
In file included from /home/pi/repos/vcpkg-tool/include/vcpkg-test/mockcmakevarprovider.h:3:
In file included from /home/pi/repos/vcpkg-tool/include/vcpkg/cmakevars.h:10:
In file included from /home/pi/repos/vcpkg-tool/include/vcpkg/packagespec.h:3:
/home/pi/repos/vcpkg-tool/include/vcpkg/base/expected.h:208:29: error: no member named 'invoke' in namespace 'std'; did you mean '__invoke'?
                return std::invoke(f, *m_t.get(), static_cast<Args&&>(args)...);
                       ~~~~~^~~~~~
                            __invoke
/usr/bin/../lib/gcc/arm-linux-gnueabihf/8/../../../../include/c++/8/bits/invoke.h:89:5: note: '__invoke' declared here
    __invoke(_Callable&& __fn, _Args&&... __args)
    ^
In file included from /home/pi/repos/vcpkg-tool/src/vcpkg-test/mockcmakevarsprovider.cpp:1:
In file included from /home/pi/repos/vcpkg-tool/include/vcpkg-test/mockcmakevarprovider.h:3:
In file included from /home/pi/repos/vcpkg-tool/include/vcpkg/cmakevars.h:10:
In file included from /home/pi/repos/vcpkg-tool/include/vcpkg/packagespec.h:3:
/home/pi/repos/vcpkg-tool/include/vcpkg/base/expected.h:221:29: error: no member named 'invoke' in namespace 'std'; did you mean '__invoke'?
                return std::invoke(f, std::move(*m_t.get()), static_cast<Args&&>(args)...);
                       ~~~~~^~~~~~
                            __invoke
/usr/bin/../lib/gcc/arm-linux-gnueabihf/8/../../../../include/c++/8/bits/invoke.h:89:5: note: '__invoke' declared here
    __invoke(_Callable&& __fn, _Args&&... __args)
    ^

std::invoke needs header <functional> to be included.

`std::invoke` needs `<functional>` to be included
@ras0219-msft ras0219-msft merged commit eae2334 into microsoft:main Jan 27, 2022
@ras0219-msft
Copy link
Contributor

Thanks for the fix!

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

Successfully merging this pull request may close these issues.

2 participants