LiveAsynchronousVisualizedArchitecture/simdb

Compile error on linux with gcc-7.3

zwm0502 opened this issue · 1 comments

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]

@zwm0502 can you check with the new fix?