simdb
simdb copied to clipboard
fix: Compilation problems detected on macos, linux
trafficstars
Fix issue: https://github.com/LiveAsynchronousVisualizedArchitecture/simdb/issues/4 and https://github.com/LiveAsynchronousVisualizedArchitecture/simdb/issues/8
- headCmpEx() changed to not use the atomic copy operator that is set to deleted in macos (Xcode 14). Fixing the following error:
./simdb.hpp:554:41: error: copying parameter of type 'std::atomic<u64>' (aka 'atomic<unsigned long long>') invokes deleted constructor
}while( !headCmpEx( &curHead.asInt, nxtHead.asInt) );
- changing
decltype(f(vi))todecltype(f(VerIdx()))in runMatch to fix the following error
./simdb.hpp:1349:99: error: use of undeclared identifier 'vi'
bool runMatch(const void *const key, u32 klen, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const
The example is tested and works perfectly. My platform (Macos m1, Xcode14)
@LiveAsynchronousVisualizedArchitecture
It would also be good if you could get this to also work with Visual C++ 20. I'll get errors unless I define:
/D _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING