On 21/01/14 16:20, John M. Dlugosz wrote:
On 1/20/2014 6:32 AM, Nate Finch wrote:
Yes, there are some using namespace boost statements, and some of them are before some includes... but why would that suddenly break when it was working before I upgraded? Is boost now defining its own intmax_t (and other such tings, like uint64_t) where it wasn't before?
Because that's what 'using directives' ("using namespace XXX;") are for: to break builds by surprise and cause strange compatibility problems.
Any change to the XXX namespace will change the symbols seen by the importer, and that may cause ambiguities (if you're lucky -- they are caught by the compiler) or unintended bizarre calls of the wrong function you didn't even know about (esp. when templates are involved).
Don't dump somebody else's namespace into your work willy-nilly. If they are not maintained together, it's just wrong. Use using declarations for individual symbols, declaring just the ones you need (and are thus aware of).
Or alternatively avoid using "using" and use fully qualified names (e.g. boost::intmax_t) - there's nothing wrong with this, either. Leon