Support for clang.

[SVN r61640]
This commit is contained in:
Daniel James
2010-04-28 08:23:41 +00:00
parent ec97640b1b
commit 795d9f0aa7
6 changed files with 62 additions and 2 deletions

View File

@@ -731,6 +731,7 @@ namespace boost { namespace unordered_detail {
// Iterator Access
#if !defined(__clang__)
class iterator_access
{
public:
@@ -741,6 +742,28 @@ namespace boost { namespace unordered_detail {
return it.base_;
}
};
#else
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 base<Iterator>::type const&
get(Iterator const& it)
{
return it.base_;
}
};
#endif
// Iterators