Skip to content

exceptions are currently required #70

@seanmiddleditch

Description

@seanmiddleditch

cppformat cannot be compiled with exceptions disabled due to a single try/catch block with an empty catch clause.

A number of platforms and specialized applications have mandatory no-exceptions rules. Embedded apps, games, high-availability, etc. often run on platforms where exceptions are either deemed too dangerous and hard to reason about or run on memory/performance-constrained devices that can't take the code bloat hit of exceptions or even run on platforms with non-conforming C++ implementations that don't support exceptions in the first place.

The ability to disable exceptions in cppformat would be nice. It's easy enough to just comment out the one use of try/catch, but having it Just Work(tm) would be nicer.

Defines to detect exception support include __EXCEPTIONS on GCC/Cland and _HAS_EXCEPTIONS on cl (VC++).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions