Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61504 - trunk/boost/unordered/detail
From: daniel_james_at_[hidden]
Date: 2010-04-23 03:25:54


Author: danieljames
Date: 2010-04-23 03:25:53 EDT (Fri, 23 Apr 2010)
New Revision: 61504
URL: http://svn.boost.org/trac/boost/changeset/61504

Log:
Work around `friend` bug in clang.
Text files modified:
   trunk/boost/unordered/detail/fwd.hpp | 12 +++++++++++-
   1 files changed, 11 insertions(+), 1 deletions(-)

Modified: trunk/boost/unordered/detail/fwd.hpp
==============================================================================
--- trunk/boost/unordered/detail/fwd.hpp (original)
+++ trunk/boost/unordered/detail/fwd.hpp 2010-04-23 03:25:53 EDT (Fri, 23 Apr 2010)
@@ -734,8 +734,18 @@
     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 <class Iterator>
+ struct base
+ {
+ typedef BOOST_DEDUCED_TYPENAME Iterator::base type;
+ };
+
         template <class Iterator>
- static BOOST_DEDUCED_TYPENAME Iterator::base const&
+ static BOOST_DEDUCED_TYPENAME base<Iterator>::type const&
             get(Iterator const& it)
         {
             return it.base_;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk