diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-06-10 22:42:07 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-06-10 22:42:07 +0100 |
| commit | 46b167b851318306e0f321f0d27b7febd99dfcb3 (patch) | |
| tree | a9b7ac7d3befdfde89b6ccabe41760eb5628c538 /src | |
| parent | e5852f68221c0193df4444ea71f23565ec84c8c9 (diff) | |
Style tweak
Diffstat (limited to 'src')
| -rw-r--r-- | src/safe_ptr.hh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/safe_ptr.hh b/src/safe_ptr.hh index a5e11ab6..12a9b4a3 100644 --- a/src/safe_ptr.hh +++ b/src/safe_ptr.hh @@ -84,9 +84,11 @@ private: #endif }; -template<typename T> using SafePtr = - RefPtr<T, typename std::conditional<std::is_const<T>::value, - const SafeCountable, SafeCountable>::type>; +template<typename T, typename U> +using PropagateConst = typename std::conditional<std::is_const<T>::value, const U, U>::type; + +template<typename T> +using SafePtr = RefPtr<T, PropagateConst<T, SafeCountable>>; } |
