This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: abs function question
Nathan Myers <ncm-nospam@cantrip.org> writes:
| It would be an unfortunate choice to use ::abs, generally, because in
| C it's not going to be defined inline. In C there's generally a macro
| abs() hiding it, which we have to #undef because it doesn't scope.
| Leaving it undeclared in their header allows C++ to define both ::abs
| (extern) inline and std::abs aliased to it, or vice versa.
This approach assumes we have a control over the host C library --
something we generally don't.
-- Gaby