diff options
author | Volker Hilsheimer <[email protected]> | 2022-04-23 16:43:35 +0200 |
---|---|---|
committer | Volker Hilsheimer <[email protected]> | 2022-05-13 18:13:49 +0200 |
commit | 601dbd64993fcbbb2ce6aaa95ef153ffd4f852b9 (patch) | |
tree | 9218bc36e0be5a21a5c88e21f58c7c914feb78a4 /src/sql/doc/snippets/sqldatabase/sqldatabase.cpp | |
parent | b9c55b5b9e983e446695f471aed1cdf14e14c88e (diff) |
Add variadic template overloads for QJniObject/Environment methods
This allows the compiler to deduce the template arguments based on the
provided method parameters, which we can then pass to the methodSignature
and fieldSignature helpers to generate the signature string completely at
compile time.
Since we can't partially specialize template member functions, replace
the specializations for void methods with compile-time-if branches in
the general templates.
This variadic template now prevents implicit conversion from the
LiteralStorage types to const char* signatures, so catch the case where
such a type ends up in the parameter list.
Due to overload resolution rules for constructors, we need to explicitly
disable the constructor if any of the arguments is a string literal type,
as we have to keep the old C-style variadic function working for such
calls.
Add variations that use the variadic templates to the unit tests.
Change-Id: I8734664b38bae932369462330a9a03302254c33c
Reviewed-by: Assam Boudjelthia <[email protected]>
Diffstat (limited to 'src/sql/doc/snippets/sqldatabase/sqldatabase.cpp')
0 files changed, 0 insertions, 0 deletions