Hi Bruno, the problem is not very big :-) Thanks for your response! Best, Sebastian
On 23 Oct 2023, at 15:30, Bruno Haible <bruno@clisp.org> wrote:
[You don't often get email from bruno@clisp.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Hi Sebastian,
We, developers of the model checker Storm, are long-time users of CLN. Thanks for all your work. We recently got a bug message that boils down to a conflict between different libraries.
In particular, CLN adds the Macro AS in include/cln/number.h in line 274. This macro is globally defined upon including CLN and uses conflicts, e.g., MLPACK. While we can work around this issue, we thought it may be possible to rename the macro to CL_AS or even _CL_AS.
This would be problematic, because the 'As' macro is a documented (and important) functionality of CLN. For 'The', there is 'cln::the' as a template alternative, but for 'As' we don't have an alternative 'cln::as' yet.
Is the problem really so big? In https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmlpack%2Fmlpack&data=05%7C01%7Csebastian.junges%40ru.nl%7C9955f26cb93e4eb607cf08dbd3cc31ba%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638336646185626331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9AKkpwpFxV6YKVQPGE%2FycY5i5X9p%2Fv%2F8vol5ishHn%2FE%3D&reserved=0 the only uses of the identifier 'As' are not in front of an opening parenthesis: mlpack/src/mlpack/methods/lsh/lsh_search_impl.hpp:671: std::vector<bool> As = Ai; mlpack/src/mlpack/methods/lsh/lsh_search_impl.hpp:674: if (PerturbationShift(As) && PerturbationValid(As)) mlpack/src/mlpack/methods/lsh/lsh_search_impl.hpp:676: perturbationSets.push_back(As); // add shifted set to sets mlpack/src/mlpack/methods/lsh/lsh_search_impl.hpp:678: std::make_pair(PerturbationScore(As, scores), therefore in fact I cannot see a conflict with mlpack at all.
I would therefore suggest the usual workaround: - tweak the order of #includes, - '#undef As' at appropriate places.
Bruno