make test fails on MacOS due to ambiguous integer sizes.
Summary
make test
fails at [ 66%] Building CXX object CMakeFiles/test_caosdb_conversion.dir/test/test_caosdb_conversion.cpp.o
with:
/Users/test1/software/caosdb-octavelib/test/test_caosdb_conversion.cpp:46:14: error: ambiguous conversion for functional-style cast from 'long' to 'ce::Value'
auto v = ce::Value((T)c);
^~~~~~~~~~~~~~
/Users/test1/software/caosdb-octavelib/test/test_caosdb_conversion.cpp:104:3: note: in instantiation of function template specialization 'maoxdb::test_value_native<long>' requested here
test_value_native(value_contents);
^
/Users/test1/.conan/data/caosdb/0.0.20/_/_/package/1ba7da576dcf5380dd4885ae0ddf5ceca15593e1/include/caosdb/value.h:331:19: note: candidate constructor
explicit inline Value(double value)
^
/Users/test1/.conan/data/caosdb/0.0.20/_/_/package/1ba7da576dcf5380dd4885ae0ddf5ceca15593e1/include/caosdb/value.h:335:19: note: candidate constructor
explicit inline Value(int64_t value)
^
/Users/test1/.conan/data/caosdb/0.0.20/_/_/package/1ba7da576dcf5380dd4885ae0ddf5ceca15593e1/include/caosdb/value.h:339:19: note: candidate constructor
explicit inline Value(int value) : Value(static_cast<int64_t>(value)) {}
^
/Users/test1/.conan/data/caosdb/0.0.20/_/_/package/1ba7da576dcf5380dd4885ae0ddf5ceca15593e1/include/caosdb/value.h:340:19: note: candidate constructor
explicit inline Value(bool value) : ScalarProtoMessageWrapper<ProtoValue>() {
^
1 error generated.
make[4]: *** [CMakeFiles/test_caosdb_conversion.dir/test/test_caosdb_conversion.cpp.o] Error 1
Expected Behavior
make test
should work.
Actual Behavior
See above.
Steps to Reproduce the Problem
-
make test
intest
folder.
Specifications
- Version:
origin/f-macos
a88e6d36 - Platform: MacOS
$ sw_vers ProductName: macOS ProductVersion: 11.6 BuildVersion: 20G165
Ideas for fixes
- Explicit casts?
Edited by Daniel Hornung