Use template cast

This commit is contained in:
Patrick Dehne
2013-10-20 00:36:04 +02:00
committed by Vinnie Falco
parent ef6e381de3
commit ac0142a49e
2 changed files with 4 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ public:
template <bool OtherIsConst>
BufferType (BufferType <OtherIsConst> const& other)
: m_data (other.cast <pointer_type> ())
: m_data (other.template cast <pointer_type> ())
, m_size (other.size ())
{
}
@@ -75,7 +75,7 @@ public:
BufferType& operator= (
BufferType <OtherIsConst> const& other) noexcept
{
m_data = other.cast <pointer_type> ();
m_data = other.template cast <pointer_type> ();
m_size = other.size ();
return *this;
}

View File

@@ -164,7 +164,7 @@ public:
template <class U>
SharedPtr (SharedPtr <U>&& sp) noexcept
: m_p (sp.swap <U> (nullptr))
: m_p (sp.template swap <U> (nullptr))
{
}
/** @} */
@@ -185,7 +185,7 @@ public:
template <class U>
SharedPtr& operator= (SharedPtr <U>&& sp)
{
return assign (sp.swap <U> (nullptr));
return assign (sp.template swap <U> (nullptr));
}
/** @} */
#endif