RE: [boost] Re: Boost.Test problem

Anyway, the technique I suggested, which we use in Spirit, is better than your trick of hoisting the names into namespace std which is a hack that should be avoided if there are other ways.
Why is it better? Let's compare: I. Hoisting the names into namespace std - require ifdef/endif + names are fully qualified, that prevent possible ambiguity/invalid function resolution (due to ADL for example) - does not allow to use ADL + located in one place + promote uniformity of access to the symbols in std namespace (particularly in a point on use, so I could see where this symbol came from) II. Use using declaration on function level + doesn't require ifdef/endif + allows ADL usage - unqualified name is a possible source of ambiguity/invalid function resolution - needs to be repeated in all functions that refer symbol - may stand out from the rest of std symbols, potentially leading to confusion/errors My personal preference is fully qualified reference everywhere. And I don't see how other solution is any better.
Regards, -- Joel de Guzman
Regards, Gennadiy.

Rozental, Gennadiy wrote:
Anyway, the technique I suggested, which we use in Spirit, is better than your trick of hoisting the names into namespace std which is a hack that should be avoided if there are other ways.
Why is it better?
Let's compare:
[...]
My personal preference is fully qualified reference everywhere. And I don't see how other solution is any better.
Whatever... Just fix the thing! To be honest, I'm having second thoughts on using boost.test considering that it takes a long time to fix a simple error like this and the other that I posted. Perhaps the next version of Spirit will just use simple asserts as before. It seems the benefits does not outweigh the cost. Perhaps I don't need an assert on steroids if it gives me more problems to think about. -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
participants (2)
-
Joel de Guzman
-
Rozental, Gennadiy