office-gobmx/connectivity
Stephan Bergmann b512ce255f Make upcasting css::uno::Reference ctor require complete types
The main reason for the "home-grown" UpCast introduced with
904b3d1fce "Up-cast conversion constructor for
css::uno::Reference" in 2013 was probably that we could not yet rely on C++11
std::is_base_of back then.  A (welcome) side effect was that the derived class
could be incomplete.

However, specializations of UpCast relying on whether or not T2 is incomplete
are obviously an ODR violation if the type is incomplete in some TUs and
complete (and derived from T1) in others.  And even if UpCast had internal
linkage, it would still be brittle that its behavior depends on the completeness
of T2 at the point of the template's instantiation, and not necessarily at the
point of use.

That means we should better base that ctor on std::is_base_of (which we can do
now since 39a1edd6fe "Make css::uno::Reference
upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on
Clang and GCC if the completeness requirements are not met.  This change fixes
all the cases where types need to be complete now, plus any resulting
loplugin:referencecasting warnings ("the source reference is already a subtype
of the destination reference").

Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-27 07:19:30 +02:00
..
com/sun/star/sdbcx/comp/hsqldb
inc update pches 2020-04-26 15:34:06 +02:00
org/hsqldb/lib
qa
registry
source Make upcasting css::uno::Reference ctor require complete types 2020-04-27 07:19:30 +02:00
workben
AllLangMoTarget_cnr.mk
Configuration_ado.mk
Configuration_calc.mk
Configuration_dbase.mk
Configuration_evoab.mk
Configuration_firebird.mk
Configuration_flat.mk
Configuration_hsqldb.mk
Configuration_jdbc.mk
Configuration_macab.mk
Configuration_mork.mk
Configuration_mysql.mk
Configuration_mysql_jdbc.mk
Configuration_odbc.mk
Configuration_postgresql.mk
Configuration_writer.mk
CppunitTest_connectivity_ado.mk
CppunitTest_connectivity_commontools.mk
CppunitTest_connectivity_mork.mk
CppunitTest_connectivity_mysql_test.mk
CppunitTest_connectivity_sharedresources.mk
Executable_mork_helper.mk
IwyuFilter_connectivity.yaml
Jar_ConnectivityTools.mk
Jar_sdbc_hsqldb.mk
JunitTest_complex.mk
Library_ado.mk
Library_calc.mk
Library_dbase.mk
Library_dbpool2.mk
Library_dbtools.mk
Library_evoab.mk
Library_file.mk
Library_firebird_sdbc.mk
Library_flat.mk
Library_hsqldb.mk
Library_jdbc.mk
Library_macab1.mk
Library_macabdrv1.mk
Library_mork.mk
Library_mozbootstrap.mk
Library_mysql_jdbc.mk
Library_mysqlc.mk
Library_odbc.mk
Library_postgresql-sdbc-impl.mk
Library_postgresql-sdbc.mk
Library_sdbc2.mk
Library_writer.mk
Makefile
Module_connectivity.mk
Package_postgresql-sdbc.mk
Rdb_postgresql-sdbc.mk
README

Contains database pieces, drivers, etc.

[[dbaccess]] builds UI on top of this.

=== mysql_test ===

- The CppunitTest_mysql_test unit test can be used to test the mysqlc
  library with any versions of mysql or mariadb server of your choice.
  
- This test does not run automatically. It can be triggered with setting
  the environment variable "CONNECTIVITY_TEST_MYSQL_DRIVER".
  
- The environment variable should contain a URL of the following format:
  [user]/[passwd]@sdbc:mysql:mysqlc:[host]:[port]/[db_name]