From n.weidmann at lombardodier.com Wed Sep 2 11:54:10 2026 From: n.weidmann at lombardodier.com (Nicolas Weidmann) Date: Fri Sep 4 06:15:09 2026 Subject: [Ext] Re: [xsd-users] Issues with operator== In-Reply-To: References: <1f79fe8ed7f44150bafe37a76893c022@lombardodier.com> <6f790d367e624eb18ecaa89fea8f4b0e@lombardodier.com> Message-ID: <4f730ee1bdbf4cb9ad9baa99b5d4abf0@lombardodier.com> Hello Boris, How are you doing? I cam back from holidays 3 weeks ago, but could tackle the == issue only now. My == issue is exactly what you suggested! An issue with the registration code. Remember, I had to implement custom String & AnyURI. Their comparison initializers where missing... I added this in a *.cpp file in my lib and the problem disappeared: namespace { const ::xsd::cxx::tree::comparison_initializer<0, char, XsdCommonLibrary::String> String_comparison_init; const ::xsd::cxx::tree::comparison_initializer<0, char, XsdCommonLibrary::AnyURI> AnyURI_comparison_init; } // namespace Are there other such structures I should create for those 2 custom types? Regards, Nicolas Weidmann Banque Lombard Odier & Cie SA Rue de la Corraterie 11 - 1204 Gen?ve - Suisse T +41 22 709 23 17 www.lombardodier.com -----Original Message----- From: Boris Kolpackov Sent: jeudi, 6 ao?t 2026 11:15 To: Nicolas Weidmann Cc: xsd-users@codesynthesis.com Subject: Re: [Ext] Re: [xsd-users] Issues with operator== 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. [[ rethink everything. ]] [[LinkedIn]] [[Twitter]] [[Facebook]] [[Instagram]] [[YouTube]] *** IMPORTANT NOTICE REGARDING INSTRUCTIONS by EMAIL *** Please be aware that instructions received by e-mail should be considered delayed and not executed unless they have been specifically confirmed by your relationship manager/banker. Email traffic during turbulent times in the financial markets is high and cannot always be acted upon at all times. Lombard Odier cannot be held liable for such delay in execution or for the non-execution of an instruction given by email even if it was given in due time. Therefore, instructions requiring immediate action must be communicated by telephone by calling the bank?s registered landline. Thank you for your understanding. *** IMPORTANT INFORMATION ABOUT DATA PROTECTION *** You might be receiving this because you have provided us with your contact details. If this is the case note that we may process your personal data for direct marketing purposes. If you wish to object to this processing, please notify the Group?s Data Protection Officer. For more information: www.lombardodier.com/privacy-policy DISCLAIMER ********************************************** This message is intended only for use by the person to whom it is addressed. It may contain information that is privileged and confidential. Its content does not constitute a formal commitment by any company of the Lombard Odier group. If you are not the intended recipient of this message, kindly notify the sender immediately and destroy this message. Thank You. *******************************************************(dch)* From n.weidmann at lombardodier.com Thu Sep 3 04:21:26 2026 From: n.weidmann at lombardodier.com (Nicolas Weidmann) Date: Fri Sep 4 06:15:09 2026 Subject: [Ext] Re: [xsd-users] Issues with operator== In-Reply-To: <4f730ee1bdbf4cb9ad9baa99b5d4abf0@lombardodier.com> References: <1f79fe8ed7f44150bafe37a76893c022@lombardodier.com> <6f790d367e624eb18ecaa89fea8f4b0e@lombardodier.com> <4f730ee1bdbf4cb9ad9baa99b5d4abf0@lombardodier.com> Message-ID: <2ddcd908638742cf93af56c3c24a2423@lombardodier.com> Hi Boris, Actually, I need 1 more object to be initialized... comparison_plate_init! namespace { const ::xsd::cxx::tree::comparison_plate<0, char> comparison_plate_init; const ::xsd::cxx::tree::comparison_initializer<0, char, XsdCommonLibrary::String> String_comparison_init; const ::xsd::cxx::tree::comparison_initializer<0, char, XsdCommonLibrary::AnyURI> AnyURI_comparison_init; } // namespace Let me know if I have other objects to initialize for my custom types... Regards, Nicolas Weidmann Banque Lombard Odier & Cie SA Rue de la Corraterie 11 - 1204 Gen?ve - Suisse T +41 22 709 23 17 www.lombardodier.com -----Original Message----- From: Nicolas Weidmann Sent: mercredi, 2 septembre 2026 17:54 To: xsd-users@codesynthesis.com Subject: RE: [Ext] Re: [xsd-users] Issues with operator== Hello Boris, How are you doing? I cam back from holidays 3 weeks ago, but could tackle the == issue only now. My == issue is exactly what you suggested! An issue with the registration code. Remember, I had to implement custom String & AnyURI. Their comparison initializers where missing... I added this in a *.cpp file in my lib and the problem disappeared: namespace { const ::xsd::cxx::tree::comparison_initializer<0, char, XsdCommonLibrary::String> String_comparison_init; const ::xsd::cxx::tree::comparison_initializer<0, char, XsdCommonLibrary::AnyURI> AnyURI_comparison_init; } // namespace Are there other such structures I should create for those 2 custom types? Regards, Nicolas Weidmann Banque Lombard Odier & Cie SA Rue de la Corraterie 11 - 1204 Gen?ve - Suisse T +41 22 709 23 17 www.lombardodier.com -----Original Message----- From: Boris Kolpackov Sent: jeudi, 6 ao?t 2026 11:15 To: Nicolas Weidmann Cc: xsd-users@codesynthesis.com Subject: Re: [Ext] Re: [xsd-users] Issues with operator== 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. [[ rethink everything. ]] [[LinkedIn]] [[Twitter]] [[Facebook]] [[Instagram]] [[YouTube]] *** IMPORTANT NOTICE REGARDING INSTRUCTIONS by EMAIL *** Please be aware that instructions received by e-mail should be considered delayed and not executed unless they have been specifically confirmed by your relationship manager/banker. Email traffic during turbulent times in the financial markets is high and cannot always be acted upon at all times. Lombard Odier cannot be held liable for such delay in execution or for the non-execution of an instruction given by email even if it was given in due time. Therefore, instructions requiring immediate action must be communicated by telephone by calling the bank?s registered landline. Thank you for your understanding. *** IMPORTANT INFORMATION ABOUT DATA PROTECTION *** You might be receiving this because you have provided us with your contact details. If this is the case note that we may process your personal data for direct marketing purposes. If you wish to object to this processing, please notify the Group?s Data Protection Officer. For more information: www.lombardodier.com/privacy-policy DISCLAIMER ********************************************** This message is intended only for use by the person to whom it is addressed. It may contain information that is privileged and confidential. Its content does not constitute a formal commitment by any company of the Lombard Odier group. If you are not the intended recipient of this message, kindly notify the sender immediately and destroy this message. Thank You. *******************************************************(dch)* From boris at codesynthesis.com Fri Sep 4 06:24:24 2026 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Sep 4 06:24:37 2026 Subject: [Ext] Re: [xsd-users] Issues with operator== In-Reply-To: <2ddcd908638742cf93af56c3c24a2423@lombardodier.com> References: <1f79fe8ed7f44150bafe37a76893c022@lombardodier.com> <6f790d367e624eb18ecaa89fea8f4b0e@lombardodier.com> <4f730ee1bdbf4cb9ad9baa99b5d4abf0@lombardodier.com> <2ddcd908638742cf93af56c3c24a2423@lombardodier.com> Message-ID: Nicolas Weidmann writes: > Let me know if I have other objects to initialize for my custom types... I did a search for "_initializer" in libxsd and besides comparison, there were two more instances: 1. std_ostream_initializer You only need this if you compile your schemas with --generate-ostream (to be able to print object model to std::ostream). 2. stream_insertion/extraction_initialize You only need this if you compile your schemas with --generate-insertion and/or --generate-extraction (to be able to save object mode to other formats, such as XDR). From n.weidmann at lombardodier.com Fri Sep 4 06:46:40 2026 From: n.weidmann at lombardodier.com (Nicolas Weidmann) Date: Mon Sep 7 08:36:27 2026 Subject: [Ext] Re: [xsd-users] Issues with operator== In-Reply-To: References: <1f79fe8ed7f44150bafe37a76893c022@lombardodier.com> <6f790d367e624eb18ecaa89fea8f4b0e@lombardodier.com> <4f730ee1bdbf4cb9ad9baa99b5d4abf0@lombardodier.com> <2ddcd908638742cf93af56c3c24a2423@lombardodier.com> Message-ID: <31aac7d3a1a2417db1b5b1e741949ab2@lombardodier.com> Hello Boris, Thanks a lot for the information. I use --generate-ostream... Regarding the 2 others, I will put a note in the README.md of my common lib in case I start using it. Have a great week-end, Nicolas Weidmann Banque Lombard Odier & Cie SA Rue de la Corraterie 11 - 1204 Gen?ve - Suisse T +41 22 709 23 17 www.lombardodier.com -----Original Message----- From: Boris Kolpackov Sent: vendredi, 4 septembre 2026 12:24 To: Nicolas Weidmann Cc: xsd-users@codesynthesis.com Subject: Re: [Ext] Re: [xsd-users] Issues with operator== Nicolas Weidmann writes: > Let me know if I have other objects to initialize for my custom types... I did a search for "_initializer" in libxsd and besides comparison, there were two more instances: 1. std_ostream_initializer You only need this if you compile your schemas with --generate-ostream (to be able to print object model to std::ostream). 2. stream_insertion/extraction_initialize You only need this if you compile your schemas with --generate-insertion and/or --generate-extraction (to be able to save object mode to other formats, such as XDR). [[ rethink everything. ]] [[LinkedIn]] [[Twitter]] [[Facebook]] [[Instagram]] [[YouTube]] *** IMPORTANT NOTICE REGARDING INSTRUCTIONS by EMAIL *** Please be aware that instructions received by e-mail should be considered delayed and not executed unless they have been specifically confirmed by your relationship manager/banker. Email traffic during turbulent times in the financial markets is high and cannot always be acted upon at all times. Lombard Odier cannot be held liable for such delay in execution or for the non-execution of an instruction given by email even if it was given in due time. Therefore, instructions requiring immediate action must be communicated by telephone by calling the bank?s registered landline. Thank you for your understanding. *** IMPORTANT INFORMATION ABOUT DATA PROTECTION *** You might be receiving this because you have provided us with your contact details. If this is the case note that we may process your personal data for direct marketing purposes. If you wish to object to this processing, please notify the Group?s Data Protection Officer. For more information: www.lombardodier.com/privacy-policy DISCLAIMER ********************************************** This message is intended only for use by the person to whom it is addressed. It may contain information that is privileged and confidential. Its content does not constitute a formal commitment by any company of the Lombard Odier group. If you are not the intended recipient of this message, kindly notify the sender immediately and destroy this message. Thank You. *******************************************************(dch)* From n.weidmann at lombardodier.com Tue Sep 8 05:18:06 2026 From: n.weidmann at lombardodier.com (Nicolas Weidmann) Date: Tue Sep 8 09:15:24 2026 Subject: [Ext] Re: [xsd-users] Issues with operator== In-Reply-To: References: <1f79fe8ed7f44150bafe37a76893c022@lombardodier.com> <6f790d367e624eb18ecaa89fea8f4b0e@lombardodier.com> <4f730ee1bdbf4cb9ad9baa99b5d4abf0@lombardodier.com> <2ddcd908638742cf93af56c3c24a2423@lombardodier.com> Message-ID: <7b0febe29b4c45dab2b9aedf226c4ad8@lombardodier.com> Hello Boris, Following your advice, I now have: namespace { const xsd::cxx::tree::comparison_plate<0, char> comparison_plate_init; const xsd::cxx::tree::comparison_initializer<0, char, XsdCommonLibrary::String> String_comparison_init; const xsd::cxx::tree::comparison_initializer<0, char, XsdCommonLibrary::AnyURI> AnyURI_comparison_init; const xsd::cxx::tree::type_factory_plate<0, char> type_factory_plate_init; const xsd::cxx::tree::type_factory_initializer<0, char, XsdCommonLibrary::String> String_factory_init(xsd::cxx::tree::bits::string(), xsd::cxx::tree::bits::xml_schema()); const xsd::cxx::tree::type_factory_initializer<0, char, XsdCommonLibrary::AnyURI> AnyURI_factory_init(xsd::cxx::tree::bits::any_uri(), xsd::cxx::tree::bits::xml_schema()); const xsd::cxx::tree::type_serializer_plate<0, char> type_serializer_plate_init; const xsd::cxx::tree::type_serializer_initializer<0, char, XsdCommonLibrary::String> String_serializer_init(xsd::cxx::tree::bits::string(), xsd::cxx::tree::bits::xml_schema()); const xsd::cxx::tree::type_serializer_initializer<0, char, XsdCommonLibrary::AnyURI> AnyURI_serializer_init(xsd::cxx::tree::bits::any_uri(), xsd::cxx::tree::bits::xml_schema()); } // namespace Regards, Nicolas Weidmann Banque Lombard Odier & Cie SA Rue de la Corraterie 11 - 1204 Gen?ve - Suisse T +41 22 709 23 17 www.lombardodier.com -----Original Message----- From: Boris Kolpackov Sent: vendredi, 4 septembre 2026 12:24 To: Nicolas Weidmann Cc: xsd-users@codesynthesis.com Subject: Re: [Ext] Re: [xsd-users] Issues with operator== Nicolas Weidmann writes: > Let me know if I have other objects to initialize for my custom types... I did a search for "_initializer" in libxsd and besides comparison, there were two more instances: 1. std_ostream_initializer You only need this if you compile your schemas with --generate-ostream (to be able to print object model to std::ostream). 2. stream_insertion/extraction_initialize You only need this if you compile your schemas with --generate-insertion and/or --generate-extraction (to be able to save object mode to other formats, such as XDR). [[ rethink everything. ]] [[LinkedIn]] [[Twitter]] [[Facebook]] [[Instagram]] [[YouTube]] *** IMPORTANT NOTICE REGARDING INSTRUCTIONS by EMAIL *** Please be aware that instructions received by e-mail should be considered delayed and not executed unless they have been specifically confirmed by your relationship manager/banker. Email traffic during turbulent times in the financial markets is high and cannot always be acted upon at all times. Lombard Odier cannot be held liable for such delay in execution or for the non-execution of an instruction given by email even if it was given in due time. Therefore, instructions requiring immediate action must be communicated by telephone by calling the bank?s registered landline. Thank you for your understanding. *** IMPORTANT INFORMATION ABOUT DATA PROTECTION *** You might be receiving this because you have provided us with your contact details. If this is the case note that we may process your personal data for direct marketing purposes. If you wish to object to this processing, please notify the Group?s Data Protection Officer. For more information: www.lombardodier.com/privacy-policy DISCLAIMER ********************************************** This message is intended only for use by the person to whom it is addressed. It may contain information that is privileged and confidential. Its content does not constitute a formal commitment by any company of the Lombard Odier group. If you are not the intended recipient of this message, kindly notify the sender immediately and destroy this message. Thank You. *******************************************************(dch)*