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
the compiler complains about no matching function for call to 'C'.
I already looked at constructor.hpp and the implementations of the class templates constr{0,1,2,3,4}. I assume those to be the underlying base of C which almost certainly itself is a macro (is that right?), which would explain the limitation to 4 arguments of the call operator. But then I looked more closely and realized that only the number of template arguments changes. The call operator overloads (more or less) stay the same throughout the different versions of constr.
Why is that? I'm probably missing something obvious here...
Could you elaborate the expansion of C a little further. Somehow I can't find the macro definition. I also tried to compile with gcc -E in order to view the expansions, without much success (however, the output did hurt my eyes).
Best regards
Florian
The text was updated successfully, but these errors were encountered:
Yes, that code was written prior to variadic arguments making into the language, so i only bothered to put specializations of up to as many arguments as the examples i've been working with at the time. I'd add a variadic implementation to handle the general case for the compilers that support it.
Note that with Members macro the issue can't be solved with variadic templates, so you'd have to tell me how many arguments would be sufficient for your use cases.
If I call the function Template C as follows
everything works as expected. However, if I write,
the compiler complains about no matching function for call to 'C'.
I already looked at constructor.hpp and the implementations of the class templates constr{0,1,2,3,4}. I assume those to be the underlying base of
C
which almost certainly itself is a macro (is that right?), which would explain the limitation to 4 arguments of the call operator. But then I looked more closely and realized that only the number of template arguments changes. The call operator overloads (more or less) stay the same throughout the different versions of constr.Why is that? I'm probably missing something obvious here...
Could you elaborate the expansion of C a little further. Somehow I can't find the macro definition. I also tried to compile with
gcc -E
in order to view the expansions, without much success (however, the output did hurt my eyes).Best regards
Florian
The text was updated successfully, but these errors were encountered: