Release 1.39.0
[boost.git] / Boost_1_39_0 / boost / pool / detail / pool_construct_simple.inc
blob0760863c68cb0dda5242a46bdb824be11a520d2a
1 // Copyright (C) 2000 Stephen Cleary
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://www.boost.org for updates, documentation, and revision history.
9 // This file was AUTOMATICALLY GENERATED from "stdin"
10 //  Do NOT include directly!
11 //  Do NOT edit!
13 template <typename T0>
14 element_type * construct(const T0 & a0)
16   element_type * const ret = malloc();
17   if (ret == 0)
18     return ret;
19   try { new (ret) element_type(a0); }
20   catch (...) { free(ret); throw; }
21   return ret;
23 template <typename T0, typename T1>
24 element_type * construct(const T0 & a0, const T1 & a1)
26   element_type * const ret = malloc();
27   if (ret == 0)
28     return ret;
29   try { new (ret) element_type(a0, a1); }
30   catch (...) { free(ret); throw; }
31   return ret;
33 template <typename T0, typename T1, typename T2>
34 element_type * construct(const T0 & a0, const T1 & a1, const T2 & a2)
36   element_type * const ret = malloc();
37   if (ret == 0)
38     return ret;
39   try { new (ret) element_type(a0, a1, a2); }
40   catch (...) { free(ret); throw; }
41   return ret;