25.02.2021 08:24 Bonita Montero kirjutas:
> I've got a header with a macro to define new exception-subclasses:
>
> #pragma once
> #include <exception>
> #include <string>
>
> #define exc_subclass(base, deriv, default_what) \
> struct deriv : public base \
> { \
> deriv( char const *what = default_what ) noexcept : \
> m_what( what ) \
> { \
> } \
> deriv( exception_ptr nextException, char const *what = default_what
You are missing std:: before exception_ptr in the prev line.
Colons in preprocessor macros are fine. Commas, on the other hand, might
be a bit tricky sometimes.