From boris at codesynthesis.com Thu Aug 6 05:14:41 2026 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Aug 6 05:14:53 2026 Subject: [Ext] Re: [xsd-users] Issues with operator== In-Reply-To: <6f790d367e624eb18ecaa89fea8f4b0e@lombardodier.com> References: <1f79fe8ed7f44150bafe37a76893c022@lombardodier.com> <6f790d367e624eb18ecaa89fea8f4b0e@lombardodier.com> Message-ID: Nicolas Weidmann writes: > It's not a lib issue... > > It's another polymorphic issue when a XSD is included into another. > > Whenever I create a transaction with an order of type Fidget, > transaction.getValeu() == transaction.getValeu() is OK > > But if my transaction holds a SubFidget instead, the same comparison > results in the exception. Unlike element types, comparison is polymorphism-aware. The exception you are getting indicates that no dynamic type-specific comparison function was registered for this type. This normally has two causes: 1. You didn't compile your schema with --generate-polymorphic. This seems unlikely since parsing/serialization work as expected. 2. The registartion code was not executed. This is often happens with static libraries if the object file in question did not end up being linked in (which is a peculiar semantics of static libraries). Can you try to step into operator==() that throws with a debugger and see what happens there? You can also try to find the registartion code for the type in question and set a breakpoint there to see if it gets executed.