-
Notifications
You must be signed in to change notification settings - Fork 20
Description
We have some methods which are declared noexcept. Currently, we used proxy methods to work around this. Is there another way? Is there an interest in adding it to the existing function macros list?
A colleague hacked together a macro like this:
#define MOCK_NOEXCEPT_OVERRIDE_METHOD_EXT(M, n, S, t)
MOCK_METHOD_AUX(M, n, S, t, noexcept override,)
MOCK_METHOD_AUX(M, n, S, t, const noexcept override,)
MOCK_METHOD_HELPER(S, t,)
#define MOCK_CONST_NOEXCEPT_OVERRIDE_METHOD_EXT(M, n, S, t)
MOCK_METHOD_AUX(M, n, S, t, const noexcept override,)
MOCK_METHOD_HELPER(S, t,)
#define MOCK_NON_CONST_NOEXCEPT_OVERRIDE_METHOD_EXT(M, n, S, t)
MOCK_METHOD_AUX(M, n, S, t, noexcept override,)
MOCK_METHOD_HELPER(S, t,)
and alike (without _EXT).
Some goes for missing override, which only pops an IDE warning but would also be nice to have.
The whole solution would need the zoo of combinations with const, nonconst, explicit override and so on.