Closed Sildra closed 5 months ago
int64_t
and long long
are the same under Windows and different under linux. I will either need to wait for #954 or temporarily switch to old types for the build to pass.
I will need to add support for a c++98 version of the metaprog templates and check if adding constexpr
to the get
function avoids the weird unreachable code on the statements. I can't seems to reproduce both of those issues under VS2022.
You can base this PR on #954 if it makes things simpler.
As for the unreachable code warnings (do you have a direct link?), they can be suppressed explicitly if nothing else works.
Only the Windows builds are missing :
std::numeric_limits<long long>
.
Defining a generic alias for soci::numeric_limits<T>
+ providing specialized soci::numeric_limits<long long>
might do the trick.I will also add tests in common to check the feature.
Edit: the pre-c++11 std::numeric_limits<T>
don't have a constexpr evaluation for min/max and can't participate to template resolution. I will relax template def for pre-c++11 and switch to runtime checks. I might tell the windows compiler to use the templates post-c++11 even in std=c++98 if the compiler has the possibility.
I don't think this change is compatible (semantically and not just syntactically) with the now merged #954, so I think it should probably be closed -- but please let me know if I'm missing something.
I will check the changes proposed by the new types.
Add the ability to perform lossless conversions in the dynamic bindings. Also add an opt-in narrowing cast with the define
SOCI_WIDENING_CASTS
(to be discussed).Allow for extending the range of casts with the templated struct
soci::soci_cast
with the model ofsoci::type_conversion<T>
.