Volker Braun wrote:
On Saturday, June 14, 2014 3:46:55 PM UTC+1, leif wrote:

    W.r.t. ptrdiff_t , it's in the global namespace if you include
    stddef.h,


Sort of. If you include stddef.h then you are writing C and there are no
namespaces. If you intend to write C++ then you ought to include cstddef
instead. Yes, you can get away with including C headers in C++ but its
handly best practice.

Well, I wasn't really referring to /writing/ C++ code.

Besides that C++ for a long time didn't have namespaces ;-) nor headers *not* ending with .h, actually a couple of .h headers *were part of the C++ standard* (but are deprecated now, in preference of their c* replacements). So, depending on the C++ standard you're using (or, in other words, some existing code was written for), including a .h header doesn't necessarily mean you're including a "plain" C header; it may be a ("fixed") version provided by your C++ compiler.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to