From b35f4b88f54176c819e95c131e4186a43e72a40f Mon Sep 17 00:00:00 2001 From: Gabriel Hare Date: Thu, 7 Aug 2014 20:43:14 -0700 Subject: [PATCH] Making implicit templates types discoverable. --- autowiring/atomic_object.h | 6 ++++-- autowiring/unlock_object.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/autowiring/atomic_object.h b/autowiring/atomic_object.h index b72c88268..3216aa54b 100644 --- a/autowiring/atomic_object.h +++ b/autowiring/atomic_object.h @@ -14,10 +14,12 @@ template class unlock_object; /// or to modify the contents of atomic_object. /// - Held locks, via child classes that manipulate the protected lock member. /// -template +template class atomic_object { public: - friend class unlock_object; + friend class unlock_object; + typedef object_type object; + typedef lock_type lock; typedef unlock_object unlock; typedef std::shared_ptr> shared; diff --git a/autowiring/unlock_object.h b/autowiring/unlock_object.h index a54029d2e..459ec891b 100644 --- a/autowiring/unlock_object.h +++ b/autowiring/unlock_object.h @@ -10,10 +10,12 @@ template class atomic_object; ///An unlock_object cannot be copied by construction or assignment since it maintains access. ///An unlock_object cannot be used to extend the existence of an atomic_object. /// -template +template class unlock_object { public: - typedef atomic_object atomic; + typedef object_type object; + typedef atomic_object atomic; + typedef typename atomic::lock lock; typedef typename atomic::shared shared; unlock_object(const unlock_object& source) = delete;