Skip to content

Format specifier & fmt 8 support

Compare
Choose a tag to compare
@Kaaserne Kaaserne released this 24 Jul 10:04
· 0 commits to 604be9d58521c2cca8fb630065b0eb62dde5ce24 since this release
371f9ef
  • A new parameter has been added to join, strJoin and toString() to specify the {fmt} formatting rules. A default value of "{}" is given, so no syntactic changes. Example:
std::array<double, 4> array = {1.12, 1.12, 1.12, 1.12};
auto str = lz::strJoin(array, ", ", "{:.1f}");
// str == "1.1, 1.1, 1.1, 1.1"

// or
for (std::string s : lz::join(array, ", ", "{:.1f}") {
    // do something with s
}
  • Added extra to<> overload, that enables: to<std::list<int>>(args...) instead of just to<std::list>(args...).
  • Reduced symbol sizes by if constexpr and enable if
  • Removed reference from reference typedef in lz::range
  • Added std::decay in to<> container type, which would normally cause a compile error
  • Fixed CMake lz standalone issues
  • Fixed a move that did not do anything 9ae8ec0
  • {fmt} version 8 support
  • Added member methods: copyTo and transformTo that copies/transforms the current view inside the given output iterator.