Exceptions are one of the error-handling mechanisms available in C++. They are the only viable mechanism for reporting errors in constructors or operators.
Exceptions do not introduce an overhead for the happy path; however, exceptions do increase the binary's size, and because handling a thrown exception is relatively slow, they are only suitable for rare occurrences.
Compiler Explorer link: https://compiler-explorer.com/z/qMWTWhcWh