There is another issue that I need to address and I'm not quite
sure how to go about it: with the macro-based API, we make use of
pre-processor trickery to insert __FILE__, __LINE__ and
__FUNCTION__ into the argument list of functions.
When I change VEC_pop(V) with V->pop(), the macro expansion no
longer exists and we lose the caller references. Richi, I
understand that your __builtin_FILE patch would allow me to
declare default values for these arguments? Something like:
T vec_t<T>::pop(const char *file_ = __builtin_FILE,
unsigned line_ = __builtin_LINE,
const char *function_ = __builtin_FUNCTION)
which would then be evaluated at the call site and get the right
values. Is that more or less how your solution works?
If so, then we could get away with that in most cases. However,
we would still have the problem of operator functions (e.g.,
vec_t::operator[]).