summaryrefslogtreecommitdiff
path: root/ACE/contrib/utility/Utility/ReferenceCounting/Interface.tpp
blob: 6a6a1d2d2638ffb900efd004d8203d531c2192fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// file      : Utility/ReferenceCounting/Interface.tpp
// author    : Boris Kolpackov <boris@kolpackov.net>
// copyright : Copyright (c) 2002-2003 Boris Kolpackov
// license   : http://kolpackov.net/license.html

namespace Utility
{
  namespace ReferenceCounting
  {
    template <typename Type>
    inline Type*
    add_ref (Type* ptr)
      throw (Interface::Exception, Interface::SystemException)
    {
      if (ptr != 0) ptr->add_ref ();
      return ptr;
    }
  }
}
//$Id$