
Vladislav Lazarenko <snail@b2bits.com> writes:
# define BOOST_DECLARE_TEMPLATE_FRIEND(T) \ namespace boost { namespace template_friend { \ struct friend_maker { \ typedef T T2; \ }; \ typedef typename friend_maker::T2 friend_type; \ friend friend_type;
<snip> Okay, this macro opens new namespaces whereever I use it.
namespace boost { // protection from unintended ADL namespace sealed_ { template <typename T1, typename T2> class sealed_impl { BOOST_DECLARE_TEMPLATE_FRIEND(T1); BOOST_DECLARE_TEMPLATE_FRIEND(T2);
And here we are opening namespace within a class template body. Last time I checked that was illegal. What am I missing? -- Dave Abrahams Boost Consulting www.boost-consulting.com