rename SmartPtr-ByRef and ScopeGuard-ByRefHolder into RefToValue and move it to loki/RefToValue.h
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@530 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
56ccba6d09
commit
1cd7d08d7c
3 changed files with 81 additions and 47 deletions
|
@ -22,30 +22,6 @@
|
|||
namespace Loki
|
||||
{
|
||||
|
||||
template <class T>
|
||||
class RefHolder
|
||||
{
|
||||
T& ref_;
|
||||
public:
|
||||
RefHolder(T& ref) : ref_(ref)
|
||||
{}
|
||||
|
||||
operator T& () const
|
||||
{
|
||||
return ref_;
|
||||
}
|
||||
|
||||
private:
|
||||
// Disable assignment - not implemented
|
||||
RefHolder& operator=(const RefHolder&);
|
||||
};
|
||||
|
||||
template <class T>
|
||||
inline RefHolder<T> ByRef(T& t)
|
||||
{
|
||||
return RefHolder<T>(t);
|
||||
}
|
||||
|
||||
class ScopeGuardImplBase
|
||||
{
|
||||
ScopeGuardImplBase& operator =(const ScopeGuardImplBase&);
|
||||
|
@ -385,6 +361,9 @@ namespace Loki
|
|||
#endif //LOKI_SCOPEGUARD_H_
|
||||
|
||||
// $Log$
|
||||
// Revision 1.5 2006/02/14 11:54:46 syntheticpp
|
||||
// rename SmartPtr-ByRef and ScopeGuard-ByRefHolder into RefToValue and move it to loki/RefToValue.h
|
||||
//
|
||||
// Revision 1.4 2006/01/16 19:05:09 rich_sposato
|
||||
// Added cvs keywords.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue