boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
96 stars 116 forks source link

Compilation fails if custom key comparison is used #275

Closed asclearuc closed 4 weeks ago

asclearuc commented 2 months ago

The company I work for - wants to migrate to newer version of boost (1.78 -> 1.80+), and next change (https://github.com/boostorg/container/commit/ccf13f6770409f22812fd9839314c97653e11d84#diff-0034e7b487413a758657a08287f73eaab77da00e768e8db209ed389cc59ad7a0R1226-R1270) - breaks the compilation:

The code has the custom collator, which must not have default constructor.

igaztanaga commented 4 weeks ago

I've changed all default-constructed KeyNodeCompare instances in tree in the following commit:

https://github.com/boostorg/container/commit/13be16a0c8e60468f0c2a99a4c474e175aa4ee29

This should solve the problem. A reduced example of your use case would help, I could add a similar tests to the regression.