Files
rippled/include/xrpl/basics
Ed Hennis 19c60924a5 Merge remote-tracking branch 'XRPLF/ximinez/number-fix-maxrepcusp' into ximinez/number-maxint-range
* XRPLF/ximinez/number-fix-maxrepcusp:
  Fix more AMM tests, and to not exclude fixCleanup3_2_0
  docs: Add --parallel flag to cmake build commands in BUILD.md (7302)
  fix: Fix wrong hybrid offer orderbook placement and update `LedgerStateFix` to amend `ExchangeRate` meta (7087)
  Change the priority of the amendments for large mantissas
  Apply suggestions from @Tapanito code review
  Apply suggestions from Copilot code review
  Review feedback from @tapanito: lambda checks condition in doRoundUp
  style: More clang-tidy identifier renaming (7290)
  fix: Update pDEX invariant firing under a valid offer deletion (7118)
  fix: Fix multisign and signfor to check for delegate (7064)
  refactor: Fix `sfGeneric` and `sfInvalid` field names (7300)
  docs: Fix some comments to improve readability (7122)
  feat: Propagate underlying MPT flags to vault shares (7077)
2026-05-21 15:07:39 +01:00
..
2026-02-20 13:29:51 -05:00
2026-02-20 13:29:51 -05:00

Basics

Utility functions and classes.

The module xrpl/basics should contain no dependencies on other modules.

Choosing an xrpld container.

  • std::vector

    • For ordered containers with most insertions or erases at the end.
  • std::deque

    • For ordered containers with most insertions or erases at the start or end.
  • std::list

    • For ordered containers with inserts and erases to the middle.
    • For containers with iterators stable over insert and erase.
    • Generally slower and bigger than std::vector or std::deque except for those cases.
  • std::set

    • For sorted containers.
  • xrpl::hash_set

    • Where inserts and contains need to be O(1).
    • For "small" sets, std::set might be faster and smaller.
  • xrpl::hardened_hash_set

The following container is deprecated

  • std::unordered_set
  • Use xrpl::hash_set instead, which uses a better hashing algorithm.
  • Or use xrpl::hardened_hash_set to prevent algorithmic complexity attacks.