- Added
mbo::types::Required
which is similar toRefWrap
but stores the actual type (and unlikestd::optional
cannot be reset). - Added
mbo::testing::WhenTransformedBy
which allows to compare containers after transforming them. - Added custom Bazel flag
--//mbo/config:require_throws
which controls whetherMBO_CONFIG_REQUIRE
throw exceptions or use crash logging (the defaultFalse
or0
). This mostly affects containers. - Added custom Bazel flag
--//mbo/config:limited_ordered_max_unroll_capacity
. This was undocumented as--//mbo/container:limited_ordered_max_unroll_capacity
until now (though listed in the changelog). It controls the maximum unroll size for LimitedOrdered/Map/Set.
- Improved
MBO_RETURN_IF_ERROR
to correctly acceptabsl::StatusOr
expressions independently of their implementation. - Added
mbo::status::StatusBuilder
which allows to modify the message of anabsl::Status
. - Added
mbo::status::GetStatus
which allows to convert its argument to anabsl::Status
if supported. - Added macro
MBO_MOVE_TO_OR_RETURN
which can assign to structured binadings and other complex types. - Added macro
MBO_ASSERT_OK_AND_MOVE_TO
which can assign to structured binadings and other complex types. - Added matcher
mbo::testing::StatusHasPayload
that matches presence of any, a specific payload url, or a payload url with specific content. - Added matcher
mbo::testing::StatusPayloads
that matches againstStatus
/StatusOr<>
payload maps.
- Added support for smart pointer types in
Stringify
. - Added support for std::optional in
Stringify
. - Added builtin ability to suppress
nullptr
andnullopt
field values (in particular for Json output). - Added support for move only decomposing in
StructToTuple
. - Added (extendable) concept
IsSmartPtr
. - Added concept
IsOptional
. - Added extension API type
MboTypesStringifyDisable
which can be used to suppress printing.
- Prevent clangd indexing issues with
DecomposeCount
implementation.
- Added class
Stringify
which can turn arbitrary structs into strings. - Added formatting control for
AbslStringify
externder using structStringifyOptions
. - Added API extension point type
MboTypesStringifySupport
which enablesStringify
support even if not otherwise enabled (disables Abseil stringify support inStringify
). - Added API extension point type
MboTypesStringifyDoNotPrintFieldNames
which if present disables field names inStringify
. - Added
AbslStringify
ADL API extension entry pointsMboTypesStringifyFieldNames
andMboTypesStringifyOptions
. - Added function
StringifyWithFieldNames
a format control adapter forAbslStringify
. - Added field name support for non literal types in Clang.
- Added numeric field name (aka key) support and enforced for Json output.
- Added rule
mbo/types:stringify_ostream_cc
and headermbo/types/stringify_ostream.h
for automatic ostream support usingStringify
. - Added static constructors
Extend::ConstructFromTuple
andExtend::ConstructFromArgs
. - Fixed a bug where Mope did not correctly enable and disable sections.
- Added documentation and tests on how to use a mope's
--set
flag to enable/disable sections. - Fixed a bug with
DecomposeCount
. It must never return 0 (an empty aggregate cannot be decomposed using structured bindings). - Changed Clang to use more reliable overload sets (they cannot be used in GCC).
- Added crtp-struct
ExtendNoPrint
LikeExtend
but withoutPrintable
andStreamable
extender functionality. - Added support for type
char
in extenderAbslStringify
. - Added
mbo::types::TupleCat
which concatenates tuple types. - Fixed
//mbo/log:log_timing_test
for systems with limitedstd::source_location
support (e.g. MacOS).
- Improved
LimitedVector::insert
to deal better with conversions and complex types. - Improved
LimitedMap
,LimitedOrdered
,LimitedSet
andLimitedVector
ability to handle conversions. - Added diff tooling options
ignore_all_space
andignore_consecutive_space
. - Changed diff tooling options
ignore_space_change
to only ignore trailing space to matchgit diff
. - Added
mbo::log::LogTiming
a simple timing logger. - Pinned Bazel version to 7.2.1.
- Updated hedron compile commands to include a patch for pre-processed headers.
- Implemented
LimitedVector::insert
. - Fixed a bug in
LimitedVector::assign
. - Updated https://github.com/bazel-contrib/toolchains_llvm past version 1.0.0.
- Changed
LimitedMap
andLimitedSet
to not verify whether input is sorted, if they usekRequireSortedInput
andNDEBUG
is defined.
- Fixed comparison of
Extend
types with other types. Requires the other type can be turned into a tuple. - Fixed internal consistencies.
- Updated
mope
to allow comments by setting a section to nothing:{{#section=}}...{{/section}}
. - Added concept
IsTuple
which determines whether a type is astd::tuple
. - Added
mbo::hash::simple::GetHash(std::string_view)
which is constexpr safe. - Added hash support to tstring.
- Added concept
mbo::types::IsVariant
. - Added concept
mbo::types::HasVariantMember
. - Fixed issue with
Extend
ability to handle struct names when compiled with Clang. - Fixed issue with
Extend
handling move only types when used in decompose assignment. - Added template struct
BinarySearch
implements templated binary search algorithm. - Added template struct
LinearSearch
implements templated linear search algorithm. - Added template struct
ReverseSearch
implements templated reverse linear search algorithm. - Added template struct
MaxSearch
implements templated linear search for last match algorithm.
- Improved
Extend
support. - Renamed
MboExtendDoNotPrintFieldNames
toMboTypesStringifyDoNotPrintFieldNames
which is the logical naming that follows the internal structure.
- Added llvm/clang which can be triggered with
bazel ... --config=clang
. - Shortened generated extender names drastically (< 1/3rd).
- Added union member identification (enables union members for
Extend
's printing/streaming). - Added ability to suppress field name support in
Extend
by addingusing MboExtendDoNotPrintFieldNames = void;
.
- Changed the way
mbo::types::Extend
types are constructed to support more complex and deeper nested types. - Provided a new
mbo::extender::Default
which wraps all default extenders.
- Optimized
AnyScan
,ConstScan
andConvertingScan
by dropping clone layer. We also explicitly support multiple iterations on one object.
- Added
empty
andsize
toAnyScan
,ConstScan
andConvertingScan
.
- Changed
Extender
print and stream ability to output pointers to containers.
- Changed
LimitedSet
andLimitedMap
:- Changed to new optimized code for
std::less
and make that the default. - Added custom bazel flag
--//mbo/container:limited_ordered_max_unroll_capacity=N
. This controls the maximum capacityN
for whichindex_of
will be unrolled (defaults to 16, range [4...32], seembo::container::container_internal::kUnrollMaxCapacityDefault
.
- Changed to new optimized code for
- Changed
RefWrap
:- Added constexpr support.
- Made constructor implicit.
- Added template-type
RefWrap<T>
: similar tostd::reference_wrapper
but supports operators->
and*
. - Fixed double computation in
MBO_RETURN_IF_ERROR
.
- Fixed
LimitedOptionsFlag::kEmptyDestructor
use inLimitedVector
.
- Added
LimitedOptions
support toLimitedVector
.
- Changed
tstring::find_first_of
andtstring::find_last_of
solely withstring_view::find
to solve ASAN issue. - Added
LimitedSet::at_index
andLimitedMap::at_index
.
- Applied several tweaks for
*Scan
. - Improved compiler error message when using
AnyScan
with incompatible pairs due tofirst_type
being const on the right side. - Added concept
IsSameAsAnyOfRaw
/NotSameAsAnyOfRaw
which determine whether type is one of a list of types. - Added
const char* tstring::c_str
which is occasionally needed.
- Added
ConstScan
andMakeConstScan
. - Changed all
Make*Scan
types to create intermediate adapters. - Made all
*Scan
andMake*Scan
to acceptstd::initializer
types. - Added support for move-only types.
- Improved
*scan
handling of initializer_lists.
- Made
AnyScan
constructor private. - Separated
AnyScan
andConvertingScan
into distinct type with the same internal base. - Restricted
AnyScanImpl
access toMakeAnyScan
andMakeConvertingScan
. - Added
initializer_list
support forAnyScan
andConvertingScan
.
- Added missing
LimitedVector
non-converting constructor forstd::initializer_list
. - Added trait
ContainerConstIteratorValueType
. - Added
ConvertingScan
andMakeConvertingScan
.
- Added
mbo::container::AnyScan
for type erased container views (scanning). - In
//mbo/types:traits_cc
:- Added concept
ContainerHasForwardIterator
determines whether a container hasbegin
,end
andstd::forward_iterator
compliant iterators. - Added concept
ContainerHasInputIterator
determines whether a container hasbegin
,end
andstd::input_iterator
compliant iterators. - Added struct
GetDifferenceType
is either set to the type'sdifference_type
orstd::ptrdiff_t
. - Added concept
HasDifferenceType
determines whether a type has adifference_type
.
- Added concept
- Made
//mbo/types:traits_cc
publicly visible.
- Improved
LimitedMap
andLimitedSet
:- Better ASAN compatibility for constexpr.
- Allow
LimitedOption
configuration instead of simple length specification.- Option to suppress calling clear in the destructor for cases where that is not a constexpr.
- Option to require presorted input: Allows much large constexpr
LimitedSet
/LimitedValue
.
- Renamed
types::AbslFormat
totypes::AbslStringify
to better reflect its purpose. - Changed
types::AbslStringify
to print field names prefixed with a fot '.' (requires Clang).
- Made
RunfilesDir/OrDie
work correctly. - Added a new comparator
mbo::types::CompareLess
which allows container optimizations. - Moved most functionality of
LimitedMap
andLimitedSet
to new baseinternal::LimitedOrdered
. - Added
LimitedMap::index_of
andLimitedSet::index_of
(leaves one location to optimize search). - Optimized
LimitedMap
andLimitedSet
withmbo::types::CompareLess
.
- Made
Limited{Map|Set|Vector}
iterators compliant withstd::contiguous_iterator
. - Added
Limited{Map|Set|Vector}::data()
.
- Moved
CopyConvertContainer
tombo::container::ConvertContainer
and add conversion functions. - Various traits fixes to correctly handle C++ concepts (pretty much every published explanation makes the same mistake).
- Added matcher
CapacityIs
. - Added
LimitedMap
.
- For
LimitedVector
add an unused sentinal, so thatend
and other functions do not cause memory issues.
- Made
LimitedSet
andLimitedVector
use C-arrays instead ofstd::array
in order to solve some ASAN issues. - Made
NoDestruct
ASAN friendly. - Made tests PASS in mode ASAN out-of-the-box for Clang.
- Made
//mbo/types:tstring_test
PASS in ASAN mode.
- Fixed issue with MOPE in case it runs as an external dependency.
- Made tests work when run as external repository dependency.
- Added
LimitedSet::contains_all(other)
which performs contains-all-of functionality (not part of STL). - Added
LimitedSet::contains_any(other)
which performs contains-any-of functionality (not part of STL).
- Added support for GCC (11.4/Ubuntu 22.04).
- Changed Print Extender's
Print
toToString
which is a more widely used name. - Changed Print Extender's
ToString
to print field names (if available, e.g. Clang 16). - When compiling with Clang show field names with the
AbslStringify
extender. - Enabled
static constexpr NoDestruct<>
for more cases and compiler versions. - container:
- Added:
- class
LimitedSet
: A space loimited, constexpr compliant set. - class
LimitedVector
: A space limited, constexpr compliant vector.
- class
- Added:
- diff:
- Updated
unified_diff
with many more diff features.
- Updated
- file:
- Added:
- function
GetMaxLines
: Reads at most given number of text lines from a file or returns absl::Status error. - function
JoinPathsRespectAbsolute
: Join multiple path elements respecting absolute path elements. - class
IniFile
: A simple INI file reader.
- function
- Added:
- Mope:
- The
MOPE
templating engine. Runbazel run //mbo/mope -- --help
for detailed documentation. - mbo/mope
- binary
mope
.
- binary
- mbo/mope:mope_cc, mbo/mope/mope.h
- class
Template
: The mope template engine and data holder.
- class
- mbo/mope:ini_cc, mbo/mope/ini.h
- function
ReadIniToTemlate
: Helper to initialize a mope Template from an INI file.
- function
- mbo/mope:mope_bzl, mbo/mope/mope.bzl
- bzl-rule
mope
: A rule that expands a mope template file. - bazl-macro
mope_test
: A test rule compares mope template expansion against golden files. This supportsclang-format
and thus can be used for source-code generation and verification.
- bzl-rule
- The
- status:
- Added:
- macro
MBO_RETURN_IF_ERROR
: Macro that simplifies handling functions returningabsl::Status
. - macro
MBO_ASSIGN_OR_RETURN
: Macro that simplifies handling functions returningabsl::StatusOr<T>
.
- macro
- Added:
- strings:
- Added:
- struct
StripCommentsArgs
: Arguments forStripComments
andStripLineComments
. - function
StripComments
: Strips comments from lines. - function
StripLineComments
: Strips comments from a single line. - struct
StripParsedCommentsArgs
: Arguments forStripParsedComments
andStripParsedLineComments
. - function
StripParsedComments
: Strips comments from parsed lines. - function
StripLineParsedComments
: Strips comments from a single parsed line.
- struct
- Added:
- testing:
- Added:
- macro
MBO_ASSERT_OK_AND_ASSIGN
: Simplifies testing with functions that returnabsl::StatusOr<T>
.
- macro
- Added:
- types:
- Addded:
- concept
ContainerIsForwardIteratable
determines whether a types can be used in forward iteration. - concept
ContainerHasEmplace
determines whether a container hasemplace
. - concept
ContainerHasEmplaceBack
determines whether a container hasemplace_back
. - concept
ContainerHasInsert
determines whether a container hasinsert
. - concept
ContainerHasPushBack
determines whether a container haspush_back
. - conversion struct
CopyConvertContainer
simplifies copying containers to value convertible containers. - concept
IsAggregate
determines whether a type is an aggregate. - concept
IsDecomposable
determines whether a type can be used in static-bindings. - concept
IsBracesConstructibleV
determines whether a type can be constructe from given argument types. - struct
NoDestruct<T>
: Implements a type that allows to use any type as a static constant.
- concept
- Addded:
- Initial release: Clang support only.