Exceptions: Yes or No?

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • expected

    C++11/14/17 std::expected with functional-style extensions

  • Exception is part of std, (ex. in std::vector constructor). Exceptions should be used in the "everything is lost" situation. In a situation where exceptions are not activated, the overhead is close to zero. For the rest there is expected (https://github.com/TartanLlama/expected)

  • libCat

    🐈‍⬛ A runtime for C++26 w/out libC or POSIX. Smaller binaries, only arena allocators, SIMD, stronger type safety than STL, and value-based errors!

  • Placement new is not really a problem, because the factory methods produce a pr-value, and unwrapping the optional should have && and const&& overloads, so assuming that there is a move-constructor or a private shallow copy-constructor then this still works. Placement new (or construct_at) would be used inside of an optional, for instance. Example

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • magnum

    Lightweight and modular C++11 graphics middleware for games and data visualization

  • C++ is similar to C in that there are multiple "styles" of use that vary from project to project. Other, usually newer languages (C#, Python, Rust, etc) tend to have a stronger sense of what idioms should be used. Whereas, for instance, some C++ projects (like some GUI libraries and game/graphics engines) will partially/entirely replace the STL (and older ones may have been around before C++ had a standard library aside from C's), or forbid the use of certain C++ features (example).

  • AECforWebAssembly

    A port of ArithmeticExpressionCompiler from x86 to WebAssembly, so that the programs written in the language can run in a browser. The compiler has been rewritten from JavaScript into C++.

  • In my AEC-to-WebAssembly compiler, I am using custom exception types for internal compiler errors: CorruptCompilationContext, InvalidTypenameException and NotImplementedException. I am handling them in main.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts