You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/mgodbolt/dev/algo/mambo/test/trompeloeil.hpp:3319:70: error: template argument 1 is invalid
std::integral_constant<bool, num == ::trompeloeil::param_list<sig>::size>; \
^
/home/mgodbolt/dev/algo/mambo/test/trompeloeil.hpp:3252:3: note: in expansion of macro ‘TROMPELOEIL_MAKE_MOCK_’
TROMPELOEIL_MAKE_MOCK_(name,,1, __VA_ARGS__,,)
^~~~~~~~~~~~~~~~~~~~~~
.... ~500 more lines in a similar fashion
There's no mention of any ambiguity in the error messages. This is somewhat confusing (but quite possibly not fixable). Of course, the code is incorrect and without the MOCK macro if one writes just struct Bar {void onFoo(Foo); } one gets a more sane error from GCC:
void onFoo(Foo);
These errors and this behaviour was seen with GCC 6.3 and trompeloeil v22. Perhaps a FAQ entry if there's no way to surface the real underlying error.
The text was updated successfully, but these errors were encountered:
Thanks @mattgodbolt. It can be difficult to trick the compiler into providing good information for ill formed programs, but at times it can be done. I'll see what I can do.
Curiously, clang++-3.9 is very clear on what the problem is:
c.cpp:17:28: error: reference to 'Foo' is ambiguous
MAKE_MOCK1(onFoo, void(Foo));
^
/var/tmp/trompeloeil/trompeloeil.hpp:3576:35: note: expanded from macro 'MAKE_MOCK1'
#define MAKE_MOCK1 TROMPELOEIL_MAKE_MOCK1
^
c.cpp:5:11: note: candidate found by name lookup is 'A::Foo'
class Foo {};
^
c.cpp:9:11: note: candidate found by name lookup is 'B::Foo'
class Foo{};
^
In the following example:
The error one gets is:
There's no mention of any ambiguity in the error messages. This is somewhat confusing (but quite possibly not fixable). Of course, the code is incorrect and without the MOCK macro if one writes just
struct Bar {void onFoo(Foo); }
one gets a more sane error from GCC:These errors and this behaviour was seen with GCC 6.3 and trompeloeil v22. Perhaps a FAQ entry if there's no way to surface the real underlying error.
The text was updated successfully, but these errors were encountered: