C CASTLE / MODULE NOTES
CASTLE/Modules/Container

MODULE 05 / 15

Containers

A convenience include for Castle’s fixed-capacity sequences, maps, buffers, strings, and other containers.

#include "castle/container/containers.hpp"

Overview

Umbrella header that pulls the Castle container family into one include. Use it when a translation unit needs several containers and convenience matters more than minimizing header fan-in.

Dependencies

  • array
  • vector
  • ring_buffer
  • stack
  • string
  • string_view
  • array_view
  • heap
  • avl_tree
  • map
  • set
  • hash_table
  • hash_map
  • hash_set
  • forward_list

Public API

APIDescription
containers.hppDefines no new types or functions; including it makes the listed container headers available.

Usage example

See samples/sample_containers.cpp.

#include "castle/container/containers.hpp"

castle::container::array<int, 2U> values{1, 2};
castle::container::map<int, int, 2U> ordered;
ordered.insert(1, 10);

Constraints & notes

  • No allocation behavior is introduced by this header; it only aggregates other Castle headers.
  • Thread-safety depends entirely on the specific container types you use; no synchronization is added here.
  • Prefer individual headers when compile time or preprocessing footprint matters.