This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] libstdc++/20534, debug mode vs. includes


Paolo Carlini wrote:

>#define _MY_ASSERT(_TEST) \
>if (!(_TEST)) \
>  { \
>    printf("%s:", __FILE__); \
>    printf("%d: ", __LINE__); \
>    printf("%s: ", __FUNCTION__); \
>    printf("Assertion '%s' failed.\n", #_TEST); \
>    abort(); \
>  } \
>  
>
I can see two problems with this approach:
1- Code bloat: trivially fixed moving out the actual printing to a function.
2- *More serious*: at the moment I don't know how to print the
instantiation types, for templates (that the real assert prints)

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]