Skip to content

Releases: USAFrenzy/ArgFormatter

v1.0.6

26 Nov 02:10

Choose a tag to compare

  • Made some more readability changes
    • Changed std::is_same_v calls to utilize the utf_utils::utf_constraints
      related calls instead
    • removed FwdRef, FwdMoveRef, Iterator, FwdMoveIter, FwdRefIter, and FwdConstRef
      from the formatter::internal_helper::af_typedefs namespace and all related
      calls to them
  • Made CustomFormatCallback() const
  • Made all the 'x'_state() functions return a const& and mad them const
  • 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* end form se_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 the size variable instead of sv.size()
    where appropriate
  • Updated the ParseFormatString() functions:
    • auto& storage is now const 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& argType to const auto& argType and moved these calls to be
      initialized in the switch statements
  • Wherever auto& storage was used to get the underlying storage container has been changed to
    const auto& storage instead
  • added new flag %k unused by strftime() to format time in DDD ddmmmyy HH:MM:SS format

v1.0.5

23 Nov 20:11

Choose a tag to compare

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_view paramaters from VerifyAltField() and VerifyLocaleField().
  • Removed unused width paramater from FormatArgument(), LocalizeArgument(), LocalizeIntegral(), and LocalizeFloatingPoint()
  • Made the std::tm paramater in LocalizeCTime() const std::tm & instead of just std::tm &
  • de-cluttered functions based on whether the top level argStorage container was being called or if the custom formatter's customStorage was 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 simple std::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 to se_from_chars()'s paramater const char* end
  • added forwarding calls where appropriate and where they were missing
  • changed the std::move(iter) portion of CaptureArgs() to std::forward<Iter>(iter) due to the forwarding reference being used here
  • added std::move(std::back_inserter(tmp)) to the format() functions as the the format_to() functions expect a rvalue here
  • In the ParseFormatString() functions, added std::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() and OnInvalidTypeSpec()
  • removed std::move() calls in the WriteSimple'x'String() line of functions as this prevented copy elision

v1.0.4

21 Nov 00:10

Choose a tag to compare

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 %T flag was encountered in a substitution bracket that contained more than one time related flag:
    • EX: {0:%a %d%m%y %T.6} -> previously the .6 here was ignored due to how parsing multiple time flags in one bracket was implemented, this has now been fixed

v1.0.3

08 Nov 00:21

Choose a tag to compare

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

06 Nov 18:54

Choose a tag to compare

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 lib Folder
  • 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

  • Fixed issues #1 and #2

v1.0.1

30 Oct 01:58

Choose a tag to compare

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 lib Folder
  • 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

22 Oct 23:34

Choose a tag to compare

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 lib Folder
  • 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 inline specifier 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