Fixes#2952. The testsuite indirectly called strftime() with conversion
specifiers defined only in C99. In MSVCRT this function conforms only to
C89. Only in the updated UCRT this functon provides the functionality of
C99.
* Implement range_formatter and format_kind
* Attempted gcc 4.8 fix
* gcc 4.8 interprets inaccessible as a hard error (instead of... not available)
* Attempting to delete set_debug_format.
* clang-format
* Different implementation of FMT_STATICALLY_WIDEN
* Renaming copy_str_range to copy_str.
* I guess I need a definition
* Forgot to delete these.
* Other PR comments.
* 2954: Add test case
* Eliminate extra-test and merge it into existing std-test instead. Add conditionals for filesystem::path testing that does not run into the ambiguity problem.
* #2968: Introduce additional compile-time predicate to detect recursive ranges and reject them in formatter specialization for ranges. In addition, introduce additional wrapper traits for the individual logical operands of the complete range constraints
* #2968: Eliminate preprocessor condition that enables the formatter specialization for std::filesystem::path
* #2968: Eliminate preprocessor condition that enables the test for the formatter specialization for std::filesystem::path
* Use own bool_constant, which is available for all C++ versions
* Reintroduce previous workaround but restrict to VS 2015 for now
* Comma fix
* - Rename is_not_recursive_range to is_nonrecursive_range and add comment that explains it being depending on is_range being true
- Merge has_fallback_formatter_delayed into is_formattable_delayed and add comment that explains it being depending on is_not_recursive_range being true
- Replace disjunction in formatter specialization by has_fallback_formatter_delayed
- Get rid of unneeded detail:: prefixes within namespace detail
* #2954: Provide std::conjunction and std::disjunction substitutes
* #2954: Use conjunction and disjunction substitute to make formatter specializations for ranges and maps more robust (especially for Visual Studio compiler family)
* #2954: As workaround for older MSVC compilers split formatter<std::filesystem::path> partial template specialization into two explicit specialization.
* 2954: Add test case
* Provide simplified implementations of conjunction and disjunction
* Remove workaround explicit specializations if the partial specialization would cause an ambiguity error
* Eliminate extra-test and merge it into existing std-test instead. Add conditionals for filesystem::path testing that does not run into the ambiguity problem.
Add support for 'std::variant' in C++17.
For C++17, if all the alternatives of a variant are formattable
the variant is now also formattable. In addition 'std::monostate'
is now formattable.
Moves implementation into 'std.h', and tests into 'std-test.cc'.
Avoid fold-expression since MSVC was crashing.
Add section for 'fmt/std.h' in API-docs.
Avoid defining various reserved identifiers (starting with underscore and capital letter). Fortunately, they were all Windows-only, so it was easy to conditionalize them in Window-only preprocessor checks.
* Implement styled arguments
* Inherit from formatter<Arg> to get the underlying `parse` and `format`
* Move styled_arg definition into the previous detail block
* Change styled_arg ctor parameters names to avoid shadowing members
* Move const before auto
* Remove redundant constructor for styled_arg
* Use the iterator instead of the buffer in styled_arg::format
* Remove unnecessary `styled` overloads
* Remove defaulted text_style parameter in styled function
* Supporting nested format specs for ranges.
* I dedicate this commit to Eric Niebler.
* clang-format
* PR comments.
* throw -> FMT_THROW
* Need to map every element too.
* Clarifying uncvref_type
* Trying to add a workaround for MSVC.
It disables entire branch of tests declaration unconditionally because CXX_STANDARD
is not defined there. But even we use CMAKE_CXX_STANDARD here, these tests should
not be disabled with standard >= C++20.
* Don't explicitly delete copy ctor of dynamic_format_arg_store
Explicitly deleting the copy ctor causes the move constructor to not be
implicitly generated. This behaviour is different than what was in
v8.0.1 and causes code that relied on the move ctor of
dynamic_format_arg_store to break.
* Add test for dynamic_format_arg_store's move ctor
* include <memory>, don't use make_unique
* Add support for subsecond printing for std::chrono::duration according to the c++20 standard
* Remove assert test that overflows intmax_t
* * Hopefully fix int64_t to int32_t conversion errors.
* Allow proper Duration::rep type to propagate via template argument deduction
* * Hopefully fix int64_t to int32_t conversion errors.
* Allow proper Duration::rep type to propagate via template argument deduction
* Fix sign conversion (-Wsign-conversion) warning treated as error in num_digits()
* Format chrono.h with clang-format
* Remove extra forward slash in doxygen style comment
Co-authored-by: Victor Zverovich <victor.zverovich@gmail.com>
* Apply all suggestions from GitHub, except for replacing the utility subsecond_helper class with a function
* * Move logic of handling subseconds from utility class to function with name write_fractional_seconds()
* Revert write(Rep value, int width) function to previous state
* Fix -Wshadow warning
* Remove unsued get_subseconds() function, its logic has been moved to write_fractional_seconds()
* Change comment from lowercase int to uppercase Int
* Simplify test check
* Integrate suggested changes
* Remove static from detail functions, they are no longer member functions of a class and static is unnecessary.
* Change comment from "amount" to "number"
Co-authored-by: Victor Zverovich <victor.zverovich@gmail.com>
This prevents accidentally writing fmt::format when fmt::print was
intended. Other than running tests, there's not a good use case for
discarding the formatted output.
* Fix unicode test
* Add xchar support to chrono formatter
* Replace strftime with std::time_put
* Add std::locale support to std::tm formatter
* Use predefined names and formats for C-locale
* Performance improvement
* Make locale-independent and C locale formats consistent among platforms