From 5bab4d4360de46f1f633d57cb4394385bf6a0173 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 23 Apr 2010 07:25:53 +0000 Subject: [PATCH] Work around `friend` bug in clang. [SVN r61504] --- include/boost/unordered/detail/fwd.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/boost/unordered/detail/fwd.hpp b/include/boost/unordered/detail/fwd.hpp index c1c31ffc..ce1d5bd1 100644 --- a/include/boost/unordered/detail/fwd.hpp +++ b/include/boost/unordered/detail/fwd.hpp @@ -734,8 +734,18 @@ namespace boost { namespace unordered_detail { class iterator_access { public: + // Note: we access Iterator::base here, rather than in the function + // signature to work around a bug in the friend support of an + // early version of clang. + template - static BOOST_DEDUCED_TYPENAME Iterator::base const& + struct base + { + typedef BOOST_DEDUCED_TYPENAME Iterator::base type; + }; + + template + static BOOST_DEDUCED_TYPENAME base::type const& get(Iterator const& it) { return it.base_;