Releases: USAFrenzy/ArgFormatter
v1.0.6
- Made some more readability changes
- Changed
std::is_same_vcalls to utilize theutf_utils::utf_constraints
related calls instead - removed FwdRef, FwdMoveRef, Iterator, FwdMoveIter, FwdRefIter, and FwdConstRef
from theformatter::internal_helper::af_typedefsnamespace and all related
calls to them
- Changed
- Made
CustomFormatCallback()const - Made all the
'x'_state()functions return aconst&and mad themconst - Made Format'x' Time related function paramaters
const & - removed unsused code block for
is_basic_char_buff&is_basic_char_buff_v - removed
const char* endformse_from_chars() - Updated calls to
se_from_chars()to reflect the above change - updated
WriteToContainer()for some small optimizations - Updated the static formatter calls to use
std::move()where appropriate - Updated
ParseFormatField()to use thesizevariable instead ofsv.size()
where appropriate - Updated the
ParseFormatString()functions:auto& storageis nowconst auto& storage- All direct writing to container calls and blocks have been replaced with
WriteToContainer()- This is to make unicode writing fully supported now
- changed
auto& argTypetoconst auto& argTypeand moved these calls to be
initialized in the switch statements
- Wherever
auto& storagewas used to get the underlying storage container has been changed to
const auto& storageinstead - added new flag
%kunused bystrftime()to format time inDDD ddmmmyy HH:MM:SSformat
v1.0.5
NOTE: Most of the changes made were for readability's sake, however, some changes made, like the below noted forwarding call additions and pre-increment over post-increment changes, saw a much needed improvement in performance
Changes:
- Removed Unused
std::string_viewparamaters fromVerifyAltField()andVerifyLocaleField(). - Removed unused
widthparamater fromFormatArgument(),LocalizeArgument(),LocalizeIntegral(), andLocalizeFloatingPoint() - Made the
std::tmparamater inLocalizeCTime()const std::tm &instead of juststd::tm & - de-cluttered functions based on whether the top level
argStoragecontainer was being called or if the custom formatter'scustomStoragewas being called by just taking a reference to the result of a ternary :auto& storage {argStorage.isCustomFormatter ? customStorage : argStorage}; - made a bunch of changes as to the order of increments - forcing most, if not all, increments to use the pre-increment syntax over the post-increment syntax
- removed the heavily verbose
std::forward<internal_helper::type_defs::FwdRef<T>>(container)wherever present and made it a simplestd::forward<T>(container)call instead as a reference should be taken anyways, so no need to explicitly state this here - Likewise, removed forwarding calls where they weren't needed - such as the forwarding calls for the underlying container in the
ParseFormatString()functions as the container value is a local variable here - added
[[maybe_unused]]attribute tose_from_chars()'s paramaterconst char* end - added forwarding calls where appropriate and where they were missing
- changed the
std::move(iter)portion ofCaptureArgs()tostd::forward<Iter>(iter)due to the forwarding reference being used here - added
std::move(std::back_inserter(tmp))to theformat()functions as the theformat_to()functions expect a rvalue here - In the
ParseFormatString()functions, addedstd::move(Iter)to the container access as the iterator passed in is an rvalue and this is the only place we use the iterator in the functions
Fixes:
- fixed
LocalizeBool()for improper addition of value size (previously it set the value size to the legnth of the bool's string value) - Fixed minor typos scattered throughout
- added missing default statements in
OnvalidTypeSpec()andOnInvalidTypeSpec() - removed
std::move()calls in theWriteSimple'x'String()line of functions as this prevented copy elision
v1.0.4
CHANGED:
- Updated internal method of writing to the underlying container by moving the static implementation into a public member function:
template<typename T, typename U>
requires utf_utils::utf_constraints::IsSupportedUSource<T> && utf_utils::utf_constraints::IsSupportedUContainer<U>
constexpr void WriteToContainer(T&& buff, size_t endPos, U&& container);- updated
se_from_chars()implementation to be able to work with any digit length - updated the
StoreCustomValue()function so that it's able to take pointer types as arguments:- previously, only lvalues and xvalues were allowed
- the function will dereference the pointer internally and store a reference to the object instead
- NOTE: there is no method for storing rvalues at the moment
- bumped version of UTF-Utils used
- improved performance for formatting to vector containers by ~3% to ~4%
FIXED:
- In
se_from_chars(), fixed the case where if the first position was not a digit, the function continued to parse instead of returning early - Fixed issue with '\n' and '\t' in time formatting only printing the character and not the control character to the underlying container
- Fixed subsecond precision formatting not correctly displaying the output expected (was an oversight on offsets needed)
- Fixed subsecond modifier parsing - was previously ignored when the
%Tflag was encountered in a substitution bracket that contained more than one time related flag:- EX:
{0:%a %d%m%y %T.6}-> previously the.6here was ignored due to how parsing multiple time flags in one bracket was implemented, this has now been fixed
- EX:
v1.0.3
This release fixes issues #1, #2 , and #3 with an added test in the test suite to ensure this behavior remains fixed.
- Changes made were adding an ArgContainer instance for custom containers so that custom formatters can store their data in this instance and not mangle/interfere with the root level formatting call.
- a pseudo-handshake was also introduced in the form of previous root level argument tracking as well as tracking whether automatic traversal will decrement or increment a counter based on what's available
v1.0.2
Compiled Version Of This Library.
NOTE:
This IS A Header-Only Library, But For Convenience's Sake, This Release Contains:
- The Compiled Version Of This Library Under The
libFolder - The Header Files Under
include.
This Is The Same As If The Build Option "BUILD_COMPILED_LIB" Was Enabled And CMake Was Run To Build The Compiled Library. If You Do NOT Need Or Want To Use The Compiled Versions Under lib, Then All You Need To Do Is Add The include Folder To Your Project And #include<ArgFormatter/ArgFormatter.h> Or #include "ArgFormatter/ArgFormatter.h" In The Project Itself.
Changes Made
v1.0.1
Compiled Version Of This Library.
NOTE:
This IS A Header-Only Library, But For Convenience's Sake, This Release Contains:
- The Compiled Version Of This Library Under The
libFolder - The Header Files Under
include.
This Is The Same As If The Build Option "BUILD_COMPILED_LIB" Was Enabled And CMake Was Run To Build The Compiled Library. If You Do NOT Need Or Want To Use The Compiled Versions Under lib, Then All You Need To Do Is Add The include Folder To Your Project And #include<ArgFormatter/ArgFormatter.h> Or #include "ArgFormatter/ArgFormatter.h" In The Project Itself.
Changes Made
- Bumped version of UTF-Utils from v1.0.0 to v1.0.1
v1.0.0
Compiled Version Of This Library.
NOTE:
This IS A Header-Only Library, But For Convenience's Sake, This Release Contains:
- The Compiled Version Of This Library Under The
libFolder - The Header Files Under
include.
This Is The Same As If The Build Option "BUILD_COMPILED_LIB" Was Enabled And CMake Was Run To Build The Compiled Library. If You Do NOT Need Or Want To Use The Compiled Versions Under lib, Then All You Need To Do Is Add The include Folder To Your Project And #include<ArgFormatter/ArgFormatter.h> Or #include "ArgFormatter/ArgFormatter.h" In The Project Itself.
Hotfix for v1.0.0
- Added the
inlinespecifier to non-templated functions which fixes an issue of where multiple symbols are detected when this project is included in an external project with multiple subprojects that use this library - Changed file include path for the dependency of UTF-Utils in order to prevent the creation of an include path for UTF-Utils in the project root folder in external projects