On 1/21/2014 4:31 PM, Gavin Lambert wrote:
On 22/01/2014 04:27, Quoth Leon Mlakar:
I've been wondering if a better strategy might be to explicitly typedef or "using" the versions I want into the global namespace (or an "app" namespace) in a common header and then use those everywhere instead. Though this is fragile against a misplaced "using namespace".
I've found that a way to address environment portability problems. In general, is class C being used from the platform's standard library, from Boost, or some tweaked version or in-company version? As a specific example, system_error is standard now, but on Windows the std::system_error is (or was at the time; I don't know about the current Visual Studio) brain-dead, but boost::system::system_error handles Win32 GetLastError codes and HRESULT's. Another platform might have better support for platform-specific errors and would be used in preference to Boost. I don't recall which platform/version did, but in general it _could_ and planning for that (or moving from one version to another later) is a good idea. —John