Skip to content

FE 0.9.0

Choose a tag to compare

@leissa leissa released this 09 May 23:15
· 217 commits to main since this release

FE 0.9.0 is a modernization release focused on C++23, better formatting utilities, cleaner enum-flag ergonomics, and more reliable packaging and documentation workflows.

Highlights

C++23 baseline

  • FE now targets C++23 instead of C++20.
  • The public docs and examples were updated to reflect the new language level.

Formatting and output improvements

  • Added fe::StreamFn for wrapping ostream-based formatting so it can be used with both operator<< and std::format.
  • Added fe::Join(range, sep) for formatting or streaming ranges without custom boilerplate.
  • Added assertf(condition, ...) for richer debug assertions.
  • Improved fe::Tab with safer arithmetic and a convenient Tab::spaces() constructor.
  • Added test coverage for the new formatting helpers.

Better bitflag enums

  • fe::BitEnum bitwise operators now work as regular global operators.
  • Bitwise operations now return the enum type instead of its underlying integer type.
  • Added fe::to_underlying(...) for explicit integer conversion.
  • Added fe::has_flag(...) plus support for ~, |=, &=, and ^=.

Robustness, install, and docs

  • Fixed the CMake install logic.
  • Tightened fe::term and fe::utf8 with broader constexpr / noexcept coverage.
  • Improved terminal-color handling, including safer Windows console detection.
  • Updated Linux and documentation CI to use GCC 14.
  • Documentation builds now run with BUILD_TESTING=OFF, and Doxygen warnings are treated as errors.

Breaking changes and upgrade notes

  1. C++23 is now required.
    Projects embedding or linking FE should build with a C++23-capable toolchain.

  2. Bitwise enum expressions stay in the enum domain.
    Code that previously compared MyEnum::A | MyEnum::B directly to an integer should now use fe::to_underlying(...) when it needs the raw bits.

  3. The old print helpers are gone.
    fe::out, fe::outln, fe::err, and fe::errln have been removed in favor of std::print and std::println.

Upgrade example

enum class Flags : unsigned {
    A = 1 << 0,
    B = 1 << 1,
};

template<>
struct fe::is_bit_enum<Flags> : std::true_type {};

Flags flags = Flags::A | Flags::B;

if (fe::has_flag(flags, Flags::A)) {
    auto bits = fe::to_underlying(flags);
    std::println("flags = {}", bits);
}