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

Paolo Carlini pcarlini@suse.de
Sun May 29 10:13:00 GMT 2005


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.



More information about the Libstdc++ mailing list