Use documented shared_ptr::element_type instead of value_type, which was removed from boost 1.53+

This commit is contained in:
Alex Zolotarev 2013-07-03 14:00:24 +03:00 committed by Alex Zolotarev
parent 661e68c4db
commit 1d7a209668
2 changed files with 5 additions and 5 deletions

View file

@ -339,23 +339,23 @@ namespace
class IndexedValue
{
public:
typedef impl::PreResult2 value_type;
typedef impl::PreResult2 element_type;
private:
array<size_t, Query::m_qCount> m_ind;
/// @todo Do not use shared_ptr for optimization issues.
/// Need to rewrite std::unique algorithm.
shared_ptr<value_type> m_val;
shared_ptr<element_type> m_val;
public:
explicit IndexedValue(value_type * v) : m_val(v)
explicit IndexedValue(element_type * v) : m_val(v)
{
for (size_t i = 0; i < m_ind.size(); ++i)
m_ind[i] = numeric_limits<size_t>::max();
}
value_type const & operator*() const { return *m_val; }
element_type const & operator*() const { return *m_val; }
void SetIndex(size_t i, size_t v) { m_ind[i] = v; }

View file

@ -239,7 +239,7 @@ private:
};
struct RefPointer
{
template <class T> typename T::value_type const & operator() (T const & t) const { return *t; }
template <class T> typename T::element_type const & operator() (T const & t) const { return *t; }
template <class T> T const & operator() (T const * t) const { return *t; }
};