Version 1.1.0
[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
Exceptionconstructor. Call sites must now writeException(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, andByteInputIteratorfor public generic APIs. - Type object-semantics concepts —
TriviallyDefaultConstructible,TriviallyCopyConstructible,CopyAssignable,TriviallyCopyAssignable,TriviallyMoveConstructible,MoveAssignable,TriviallyMoveAssignable,Copyable,Movable, rounding out the existingCopyConstructible/MoveConstructible/TriviallyCopyable/TriviallyDestructible/Swappablegroup. - 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 byTestHandlersTests. - UTF8Error — custom exception for invalid UTF-8 and wide-string Unicode input.
Changed
- Exception(component, fmt, args...) — first argument is
Component, notstd::string. Source-breaking for every call that used the old two-string form. - Type concepts — reorganized
type_traits.hxxinto focused container, wrapper, conversion, category, range, relation, and comparison groups without changing public contracts. - Template implementation split —
Bitmask,Clonable,Iterable(including its nestedIterator/ConstIterator), andSerializablenow declare their members in the.hxxheader and define them in a matching.txxfile included at the bottom of the header. Public API and behavior are unchanged;.txxfiles are installed alongside the headers. - Serializable explicit instantiation —
bool, 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 declaredextern templatein the header, so consumers link against the library's code instead of re-instantiating it locally.
Removed
StormByte::swap_endian— the transitional alias ofType::Detail::swap_endianin the rootStormBytenamespace. CallStormByte::Type::Detail::swap_endiandirectly 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.Componentmakes 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 fromstd::string_view). It now copiesfmt.get(), matching the documented “message as-is” behaviour. - Iterable::add —
add(const value_type&)requiresType::CopyConstructible;add(value_type&&)requiresType::MoveConstructible. clang-cl / MSVC no longer instantiatepush_back(const unique_ptr&). - Iterable::Iterator / ConstIterator —
iterator_categoryis taken from the underlying container iterator instead of being hardcoded asrandom_access_iterator_tag.std::distance/std::advancecompile onIterable<std::list<…>>,map,set, etc. - System::TempFileName — builds the
mkstemptemplate in astd::stringsized to the prefix instead of a 256-byte buffer, so a long prefix no longer truncates the trailingXXXXXX. - 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>) sotemplate class Serializable<bool>/charno longer instantiate bodies that call.size()on a scalar (clang-cl / clang++). - Unexpected(Derived) — no longer conflicts with
Unexpected<E>(error)whenBaseandDerivedare the same type. - String —
ToLower/ToUpperno 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.