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

Compile error on linux with gcc-7.3 #8

Open
zwm0502 opened this issue Apr 29, 2022 · 1 comment
Open

Compile error on linux with gcc-7.3 #8

zwm0502 opened this issue Apr 29, 2022 · 1 comment

Comments

@zwm0502
Copy link

zwm0502 commented Apr 29, 2022

Hello,
I met some problems when I compiled with simdb.hpp .How to deal with them. Thanks!

In file included from simdbTest.cpp:5:0:
simdb.hpp: In member function 'bool CncrLst::headCmpEx(CncrLst::u64*, au64)':
simdb.hpp:505:5: error: no matching function for call to 'atomic_compare_exchange_strong_explicit(CncrLst::au64*&, CncrLst::u64*&, CncrLst::au64&, std::memory_order, std::memory_order)'
);
^
In file included from simdb.hpp:205:0,
from simdbTest.cpp:5:

simdb.hpp: At global scope:
simdb.hpp:1230:112: error: 'vi' was not declared in this scope
auto runIfMatch(VerIdx vi, const void* const buf, u32 len, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const -> std::pair<Match, T> // std::pair<Match, decltype(f(vi))>
^~
simdb.hpp:1230:110: error: there are no arguments to 'f' that depend on a template parameter, so a declaration of 'f' must be available [-fpermissive]
auto runIfMatch(VerIdx vi, const void* const buf, u32 len, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const -> std::pair<Match, T> // std::pair<Match, decltype(f(vi))>
^
simdb.hpp:1230:110: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
simdb.hpp:1230:112: error: 'vi' was not declared in this scope
auto runIfMatch(VerIdx vi, const void* const buf, u32 len, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const -> std::pair<Match, T> // std::pair<Match, decltype(f(vi))>
^~
simdb.hpp:1230:110: error: there are no arguments to 'f' that depend on a template parameter, so a declaration of 'f' must be available [-fpermissive]
auto runIfMatch(VerIdx vi, const void* const buf, u32 len, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const -> std::pair<Match, T> // std::pair<Match, decltype(f(vi))>
^
simdb.hpp:1348:99: error: 'vi' was not declared in this scope
bool runMatch(const void *const key, u32 klen, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const
^~
simdb.hpp:1348:97: error: there are no arguments to 'f' that depend on a template parameter, so a declaration of 'f' must be available [-fpermissive]
bool runMatch(const void *const key, u32 klen, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const
^
simdb.hpp:1348:99: error: 'vi' was not declared in this scope
bool runMatch(const void *const key, u32 klen, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const
^~
simdb.hpp:1348:97: error: there are no arguments to 'f' that depend on a template parameter, so a declaration of 'f' must be available [-fpermissive]

@MohamedLamineAllal
Copy link

@zwm0502 can you check with the new 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

No branches or pull requests

2 participants