creation_using_new.inl 1.42 KB
Newer Older
jpbl's avatar
jpbl committed
1
2
/*
 *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
3
 *
jpbl's avatar
jpbl committed
4
 *    Permission is hereby granted, free of charge, to any person obtaining
5
6
 *    a copy of this software and associated documentation files
 *    (cURLpp), to deal in the Software without restriction,
jpbl's avatar
jpbl committed
7
8
 *    including without limitation the rights to use, copy, modify, merge,
 *    publish, distribute, sublicense, and/or sell copies of the Software,
9
 *    and to permit persons to whom the Software is furnished to do so,
jpbl's avatar
jpbl committed
10
 *    subject to the following conditions:
11
 *
jpbl's avatar
jpbl committed
12
13
 *    The above copyright notice and this permission notice shall be included
 *    in all copies or substantial portions of the Software.
14
 *
jpbl's avatar
jpbl committed
15
16
 *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
18
19
 *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
jpbl's avatar
jpbl committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

#ifndef CREATION_USING_NEW_INL
#define CREATION_USING_NEW_INL

template< typename T >
T *
utilspp::CreationUsingNew< T >::create()
{
   return new T;
}

template< typename T >
void
utilspp::CreationUsingNew< T >::destroy( T *obj )
{
   delete obj;
}


#endif