Skip to content

multi_index: fix compilation failure with boost >= 1.91#13

Open
iohzrd wants to merge 1 commit into
dathonohm:29.3.knots20260210+UASF-BIP110from
iohzrd:29.3.knots20260210+UASF-BIP110
Open

multi_index: fix compilation failure with boost >= 1.91#13
iohzrd wants to merge 1 commit into
dathonohm:29.3.knots20260210+UASF-BIP110from
iohzrd:29.3.knots20260210+UASF-BIP110

Conversation

@iohzrd

@iohzrd iohzrd commented May 27, 2026

Copy link
Copy Markdown

This effectively reverts a3cb309 from PR bitcoin#30194.

That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with.

The upstream BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT define is meant to provide compatibility with removed features, but it does not work for this case. Using indexed_by directly when defining the multi_index (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define.

This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs.

Backport of bitcoin/bitcoin#35175

This effectively reverts a3cb309 from PR bitcoin#30194.

That PR reduced the multi_index type signatures as recommended upstream, but
this is no longer supported as of boost 1.91 because it is no longer necessary.
1.91 drops support for the pre-c++11 work-arounds that bloated the type
signatures to begin with.

The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide
compatibility with removed features, but it does not work for this case. Using
`indexed_by` directly when defining the `multi_index` (as opposed to inheriting
from it) works with all versions, and avoids the use of the back-compat define.

This is a slight regression when building against boost < 1.91 because the
bloated type signatures are reintroduced in that case, but it's not significant
enough to go to the trouble of introducing version detection and ifdefs.

Backport of bitcoin#35175
@dathonohm

Copy link
Copy Markdown
Owner

Hi @iohzrd - Sorry for taking a while to respond. This fork is no longer maintained because the BIP-110 code has been merged into Knots and included in the latest release, v29.3.knots20260508. I recommend updating to that release, and submitting any applicable code changes to the Knots repo instead. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants