* Check in indirect_vector::emplace_back if the vector is full, when push pop checks are requested
* Add extra checks to indirect_vector
* Fix emplace in indirect_vector not taking const_iterator
* Fix usage of ipool::create<T> in indirect_vector, so that there are no intermitten objects created
---------
Co-authored-by: Béla Iványi <bela.ivanyi@idata.hu>
* Synchronize on C++ 17 for "Windows - STL" and "Windows - No STL"
MSVC C++20 handles char* differently on iteration
* Add etl::format
This adds etl::format, guided by std::format, avoiding dynamic memory
allocation
* Spare more Resources for non-verbose Errors
At the moment we only remove the __FILE__ in case ETL_VERBOSE_ERRORS is
not set. However, we also want to remove the error text which can
consume quite some resources and without the file name the line number
is also not very useful.
* Introduce separate ETL_MINIMAL_ERRORS to keep backwards compatability
To not break runtime backwards compatability, instead of removing the
text in case of ETL_VERBOSE_ERRORS not defined, we introduce a second
flag ETL_MINIMAL_ERRORS which is mutually exclusive. The semantic is as
follows:
- ETL_VERBOSE_ERRORS: We use verbose text, file names and line numbers.
- ETL_MINIMAL_ERRORS: We do not use anything.
- ETL_VERBOSE_ERRORS and ETL_MINIMAL_ERRORS: Issue an error.
- non defined: We use terse text without file names nor line numbers.
---------
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
* topic/expected-monadic-operations:
- added and_then, or_else, transform, and transform_error with simple tests
* topic/expected-monadic-operation:
- added void TValue specialization operations
- updated unit tests to include expected<void, TError>
- added is_expected to expected.h, used in and_then to ensure that the returned type is an expected
* topic/expected-monadic-operations:
- made implementation c++11 compatible
* topic/expected-monadic-operations:
- started addressing coderabbit feedback
* topic/expected-monadic-operations:
- adapted invoke to etl
- reworked return type deduction
- filled in or_else unit tests to be more complete
- still need to add invoke unit tests
* topic/expected-monadic-operations:
-c++14 compliance
* topic/expected-monadic-operations:
- completed coderabbit suggestions
* topic/expected-monadic-operations:
- formatting in invoke and expected
- added test suite for invoke
* topic/expected-monadic-operations:
- fixed missing moves for const TValue&& and const TError&&
* topic/expected-monadic-operations:
- made everything c++11 compatible, very verbose as a result
* topic/expected-monadic-operations:
- fixed code rabbit rewivew for move semantics in const && overloads
* topic/expected-monadic-operations:
- moved around a move
* topic/expected-monadic-operations:
- added etl:: to invoke_result calls that were missing it
* topic/expected-monadic-operations:
- formatting
* topic/expected-monadic-operations:
- added invoke for void f() calls for consistency
* topic/expected-monadic-operations:
- reworked entire thing to be able to handle expected<T,E> to expected<void,E> without even more code duplication
* topic/expected-monadic-operations:
- added trailing return type to maintain c++11 compatibility
* topic/expected-monadic-operations:
- fixed mismatch between deduced type and return for a few functions
* topic/expected-monadic-operations:
- replaced calls to get<TError> and get<TValue> with get<Error_Type> and get<Value_Type>
---------
Co-authored-by: Jon Whitfield <jon@volumetrix.com>
* Add ability to derive etl::exception from std::exception
* Only add test for exception std base when using STL
* Use ETL_NOEXCEPT macro to define a function as noexcept
* Rename macro to keep in line with common style
* Add using_std_exception to etl::traits
---------
Co-authored-by: Béla Iványi <bela.ivanyi@idata.hu>
* Fix optimized tests by suppressing warning from STL
* Fix uninitialized buffer in hash for month_weekday
* Fix overlapping memcpy with memmove
* Fix random out of bounds index in __builtin_memmove
Suppressing compiler warning
* Fix array bounds warnings from static casts in message_router
In compiled code, casting to wrong message types is generated,
even though the code paths are supposed to be never taken due to runtime
msg id checks. Therefore, the warnings can be suppressed.
* Fix syntax errors in base64 decoder tests
* Fix test failure in test_rounded_integral_division.cpp when optimized
When building tests optimized, test_round_to_half_even_signed_limits
fails due to the fact that
etl::absolute(std::numeric_limits<int32_t>::min()) < 0
* Fix typo for remainder in rounded_integral_division.h
* Use etl::make_unsigned instead of std::make_unsigned
* Fix divide_round_half_down and divide_round_half_odd
* Fix typo for remainder in rounded_integral_division.h
* Use etl::make_unsigned instead of std::make_unsigned
* Fix divide_round_half_down and divide_round_half_odd