Skip to content

Version 1.1.0

Choose a tag to compare

@StormBytePP StormBytePP released this 13 Sep 19:20
· 18 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

  • Component — wrapper for the module name on the component-prefixed Exception constructor. Call sites must now write Exception(Component("Base64"), "…", args...).
  • Type concepts — Sized, SmartPointer, Swappable, DerivedFrom, EqualityComparable, ThreeWayComparable, Hashable.
  • Type range and pointer concepts — range/iterator category wrappers, range value/reference/difference aliases, ExplicitlyConvertibleTo, NullablePointer, ByteInputRange, and ByteInputIterator for public generic APIs.
  • Type object-semantics concepts — TriviallyDefaultConstructible, TriviallyCopyConstructible, CopyAssignable, TriviallyCopyAssignable, TriviallyMoveConstructible, MoveAssignable, TriviallyMoveAssignable, Copyable, Movable, rounding out the existing CopyConstructible/MoveConstructible/TriviallyCopyable/TriviallyDestructible/Swappable group.
  • Test handlers — assertions evaluate operands once and report non-streamable values safely. New macros: ASSERT_THROWS, ASSERT_NO_THROW, ASSERT_NEAR, ASSERT_CONTAINS, ASSERT_NOT_NULL, covered by TestHandlersTests.
  • UTF8Error — custom exception for invalid UTF-8 and wide-string Unicode input.

Changed

  • Exception(component, fmt, args...) — first argument is Component, not std::string. Source-breaking for every call that used the old two-string form.
  • Type concepts — reorganized type_traits.hxx into focused container, wrapper, conversion, category, range, relation, and comparison groups without changing public contracts.
  • Template implementation splitBitmask, Clonable, Iterable (including its nested Iterator/ConstIterator), and Serializable now declare their members in the .hxx header and define them in a matching .txx file included at the bottom of the header. Public API and behavior are unchanged; .txx files are installed alongside the headers.
  • Serializable explicit instantiationbool, all standard character/integer/floating-point types, and the four Codec-backed string types (std::string, std::wstring, std::u16string, std::u32string) are now explicitly instantiated inside the shared/dynamic library and declared extern template in the header, so consumers link against the library's code instead of re-instantiating it locally.

Removed

  • StormByte::swap_endian — the transitional alias of Type::Detail::swap_endian in the root StormByte namespace. Call StormByte::Type::Detail::swap_endian directly instead.

Fixed

  • Exception(component, fmt, args...)Exception(fmt, args...) was chosen for every call with 2+ arguments, so the component string became the whole message and the format/args were discarded. Component makes the prefixed overload the only viable candidate.
  • Exception(format_string, Args...) — the zero-argument path called copy_str(fmt), which did not compile when that branch was selected (e.g. construction from std::string_view). It now copies fmt.get(), matching the documented “message as-is” behaviour.
  • Iterable::addadd(const value_type&) requires Type::CopyConstructible; add(value_type&&) requires Type::MoveConstructible. clang-cl / MSVC no longer instantiate push_back(const unique_ptr&).
  • Iterable::Iterator / ConstIteratoriterator_category is taken from the underlying container iterator instead of being hardcoded as random_access_iterator_tag. std::distance / std::advance compile on Iterable<std::list<…>>, map, set, etc.
  • System::TempFileName — builds the mkstemp template in a std::string sized to the prefix instead of a 256-byte buffer, so a long prefix no longer truncates the trailing XXXXXX.
  • Serializablestd::array — deserializes elements by index and rejects a serialized count that does not match the array extent.
  • Serializable constrained helpers — container/pair/optional/trivial private helpers are member templates (template<typename U = T> requires Type::* <U>) so template class Serializable<bool> / char no longer instantiate bodies that call .size() on a scalar (clang-cl / clang++).
  • Unexpected(Derived) — no longer conflicts with Unexpected<E>(error) when Base and Derived are the same type.
  • StringToLower / ToUpper no longer pass negative signed values to the C character functions; negative byte sizes keep their sign instead of wrapping.
  • String UTF-8 conversion — wide-string conversion is now locale-independent and rejects malformed Unicode input with UTF8Error.