On 12/09/2021 9:26, John Emmas via Boost-users wrote:
On 11/09/2021 14:59, John Emmas wrote:
this seemingly minor change:-
#include
class __declspec(dllexport) Point : public boost::intrusive::list_base_hook<> { }; will immediately invoke this compile-time assertion:- "BOOST_STATIC_ASSERT(( (int)hooktags::link_mode == (int)auto_unlink ));" - i.e. the message I reported earlier...
So (presumably ?) 'boost::intrusive::list_base_hook<>' can't be used in a class that'll get exported from a DLL?
Just wondering if anyone can reproduce this? Today I've tried 3 x different revisions of libboost:- 1.77, 1.74 and 1.71 - but they all give me the same assertion message. So maybe it's an intentional limitation?
John
hi, Sorry about being missing these days. When you declare something as declspec the compiler must instantiate the class including all base classes. A base hook has members that have only sense when some options are used so the instantiation fails. To sum up: yes, boost.intrusive is not prepared to be used in a DLL interface. Best, Ion