Skip to content

Version 1.1.1

Choose a tag to compare

@StormBytePP StormBytePP released this 15 Sep 07:05
· 3 commits to master since this release

[Summary]

StormByte Base is the C++26 foundation of the StormByte suite.

Every other module links this library.
This repository is not Buffer, Config, Crypto, Database, Logger, Multimedia, Network or System — those live in their own repos and depend on Base.

Public headers under StormByte/ cover exceptions, Expected, little-endian Serializable, strings, paths, UUID v4, bitmasks, clonable types, ThreadLock, and StormByte::Type concepts.

If you landed here from a release link and have not read the tree:

  • What this module is, how to build it, and short examples: README.md
  • License: GNU Lesser General Public License version 3 or later, LICENSE

Added

  • Type category concepts — LvalueReference and RvalueReference (std::is_lvalue_reference / std::is_rvalue_reference), next to the existing Reference.
  • SystemErrorException specialization for StormByte::System helpers.

Changed

  • System::ExecutablePath — throws SystemError instead of returning "NOPATH". Paths longer than 256 bytes are resolved.

Fixed

  • Type::CopyConstructible / CopyAssignable — no longer wrap std::is_copy_* alone. They require a real T{src} / dest = src and recurse into value_type only when T is a Type::Container and not a Type::View. std::span<std::unique_ptr<T>> stays copyable; std::vector<std::unique_ptr<T>> does not.
  • Type::HasPushBack / HasPushFront / HasInsert — accept value_type&& as well as const value_type&. std::vector<std::unique_ptr<T>> is now HasPushBack, so Iterable::add takes the push_back path.
  • Iterable::add — one forwarding add(T&&) plus a by-value sink for braced-init (add({"k", v})). The sink writes to the container; it does not call add again (that recursed until a stack overflow). clang-cl / MSVC no longer instantiate push_back(const unique_ptr&).
  • Iterable container constructor — single Iterable(C&&) constrained to Container. An lvalue copy requires Type::CopyConstructible on value_type; a move requires Type::MoveConstructible.
  • Iterable copy / move — defaulted copy and copy-assign require Type::CopyConstructible / Type::CopyAssignable on Container; move and move-assign require Type::MoveConstructible / Type::MoveAssignable. Iterable<std::vector<std::unique_ptr<T>>> is move-only.
  • Iterable::Iterator / ConstIterator — arithmetic (+=, -=, +, difference) uses std::advance / std::distance instead of m_it += n, so it compiles on bidirectional containers (list, map, set). reference / pointer come from std::iterator_traits of the wrapped iterator, not Container::reference (*it on std::set is const T&).
  • System::TempFileName — throws SystemError instead of std::runtime_error. The file is created and left on disk; the caller unlinks it. Windows still only uses the first three characters of prefix.
  • System::ExecutablePath — grows the platform buffer instead of truncating at 256 bytes (GetModuleFileNameW / readlink). Failure is SystemError, not a fake path.
  • System::CurrentPath — wraps std::filesystem::filesystem_error in SystemError instead of leaking a standard exception.
  • Iterable copy / copy-assign — user-provided members with if constexpr on Type::CopyConstructible / CopyAssignable. clang-cl / MSVC dllexport of a derived class no longer instantiates vector<unique_ptr<T>> copy via requires = default.