refcnt.hh (13429:a1e199fd8122) refcnt.hh (13474:291427b0753c)
1/*
2 * Copyright (c) 2017 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 105 unchanged lines hidden (view full) ---

114 * typedef RefCountingPtr<const Foo> ConstFooPtr;
115 * @endcode
116 *
117 * These two usages are analogous to iterator and const_iterator in the stl.
118 */
119template <class T>
120class RefCountingPtr
121{
1/*
2 * Copyright (c) 2017 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 105 unchanged lines hidden (view full) ---

114 * typedef RefCountingPtr<const Foo> ConstFooPtr;
115 * @endcode
116 *
117 * These two usages are analogous to iterator and const_iterator in the stl.
118 */
119template <class T>
120class RefCountingPtr
121{
122 public:
123 using PtrType = T*;
124
122 protected:
123 /** Convenience aliases for const/non-const versions of T w/ friendship. */
124 /** @{ */
125 static constexpr auto TisConst = std::is_const<T>::value;
126 using ConstT = typename std::conditional<TisConst,
127 RefCountingPtr<T>,
128 RefCountingPtr<typename std::add_const<T>::type>>::type;
129 friend ConstT;

--- 157 unchanged lines hidden ---
125 protected:
126 /** Convenience aliases for const/non-const versions of T w/ friendship. */
127 /** @{ */
128 static constexpr auto TisConst = std::is_const<T>::value;
129 using ConstT = typename std::conditional<TisConst,
130 RefCountingPtr<T>,
131 RefCountingPtr<typename std::add_const<T>::type>>::type;
132 friend ConstT;

--- 157 unchanged lines hidden ---