On Sun, Jan 20, 2013 at 16:20:13 +0100, Max Kellermann wrote:
> > C++ provides wrappers for standard C headers (e.g. cstdio for stdio.h).
> > Are there any rules on them? I tend to use them, however they have
> > serious disadvantage: it's hard to predict whenever some function
> > would appear to std namespace. So should we dismiss those headers?
> 
> I have never used the C++ wrapper headers, I don't know why they exist
> and whether using them has an advantage.  Until somebody explains it
> to me, I'll keep on using standard C headers, but I wouldn't mind
> patches using C++ headers and std::.

Things like std::min and std::max are implemented using overloads
instead of as macros. Same with pretty much all of the math functions.
Looking at GCC 4.7.2's cstdlib, there are quite a few functions which
are implemented using real functions instead of macros (so you can pass
them as arguments to std::for_each and other higher-level functions from
<algorithm>).

--Ben

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to