[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#156946: cassert> not putting assert in namespace std?



mkc@stowers-institute.org writes:

> If I do
> 
>    #include <cassert>
> 
> 'assert' is not being put into the namespace std, although the comment
> in cassert implies it will be, and it should be, as far as I know.
> 
> (I think this is happening with errno, too.)

You are mistaken. assert is a macro, and must be a macro, so it must
not be in a namespace, likewise for errno (see 17.4.1.2/5 of ISO
14882:1998 for details).

Regards,
Martin



Reply to: