Why should std::string be treated differently than BOOL, PSID, HDESK, HWINSTA, etc?
----- Rom -----Original Message----- From: Oliver Bock [mailto:[email protected]] Sent: Friday, January 11, 2013 12:44 PM To: Rom Walton Cc: [email protected] Subject: Re: [boinc_dev] Regression in f72fef8 On 1/11/13 18:35 , Rom Walton wrote: > If I remember correctly, the original function prototypes just used > string instead of std::string. Using string in combination with the > 'using std' namespace directive is dangerous in a header file if there > is another string class being used by a project. > > When I moved stuff from util.h to win_util.h I cleaned that up. I don't question specifying the namespace explicitly. That's just fine. However, the very header defining that namespace and it's symbols isn't included. So, why not include <string> in win_util.h? That's all I'm trying to understand. > By including windows.h in a header, you might accidently allow the > inclusion of an API into the namespace that would otherwise fail to > compile. When the app goes to run on an older version of Windows that > doesn't support the API the app blows up. Ok, fair enough. Oliver _______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
