530967061

Results 6 comments of 530967061

class holder dynamic_cast to class type_holder in type-holder.h ``` class holder { public: holder() {} virtual ~holder() {} template T get() { type_holder* p = dynamic_cast(this); if (p) { return...

I used soci_sqlite3_test for test and: ``` ldd soci_sqlite3_test linux-vdso.so.1 => (0x00007fffaede6000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f41158a5000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f41156a1000) libsqlite3.so.0 => /lib64/libsqlite3.so.0 (0x00007f41153ec000) libsoci_sqlite3.so.4.0 => /app/yacbs/softwear/source/soci-4.0.2/build/lib/libsoci_sqlite3.so.4.0 (0x00007f4115c9e000) libsoci_core.so.4.0 =>...

Remaining failures are also holder bad_cast to type_holder. Then I tried __attribute__ (( visibility("default") )) instead of SOCI_DECL for type_holder and holder, also 2 test cases failed. There must be...

[Another sample for RTTI failure with clang](https://github.com/xiaoyur347/ndk_dynamic_cast_test) If I compiled with clang and pass -DCMAKE_CXX_FLAGS='-stdlib=libc++' to cmake. Then ./main print: ``` pBase=0x2176010, pInherit=(nil) ``` This may help use to understand...

OK, I will tune 'SOCI_VISIBILITY' OFF now and I think something like std::variant or [std::any](https://stackoverflow.com/questions/51361606/stdany-without-rtti-how-does-it-work) as value holders may be helpful.

I have initiated a 'pull request' to fix this problem, please help to see if it can be merged. Thanks.