-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Fantastic small lib! However I am a bit confused as to what exactly the defines are intended to do.
If we don't define ROCKET_NO_EXCEPTIONS Then it gets defined anyway?
#ifndef ROCKET_NO_EXCEPTIONS
# define ROCKET_NO_EXCEPTIONS
#endifThen here, if it's not defined, we include std::exception?
#ifndef ROCKET_NO_EXCEPTIONS
# include <exception>
#endifSo when we get here, it's always defined?
#ifndef ROCKET_NO_EXCEPTIONS
struct error : std::exception
{
};
struct bad_optional_access final : error
{
const char* what() const noexcept override
{
return "rocket: Bad optional access.";
}
};
struct invocation_slot_error final : error
{
const char* what() const noexcept override
{
return "rocket: One of the slots has raised an exception during the signal invocation.";
}
};
#endifSo wouldn't this be the correct interface?
#ifndef ROCKET_ENABLE_EXCEPTIONS
# define ROCKET_NO_EXCEPTIONS
#endifsebastian-zapata
Metadata
Metadata
Assignees
Labels
No labels