PageRenderTime 22ms CodeModel.GetById 12ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/pool/detail/pool_construct_simple.inc

http://hadesmem.googlecode.com/
text | 43 lines | 40 code | 3 blank | 0 comment | 0 complexity | ce5622ae83be44280e9779d79d64dafa MD5 | raw file
 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.
 8
 9// This file was AUTOMATICALLY GENERATED from "stdin"
10//  Do NOT include directly!
11//  Do NOT edit!
12
13template <typename T0>
14element_type * construct(const T0 & a0)
15{
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;
22}
23template <typename T0, typename T1>
24element_type * construct(const T0 & a0, const T1 & a1)
25{
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;
32}
33template <typename T0, typename T1, typename T2>
34element_type * construct(const T0 & a0, const T1 & a1, const T2 & a2)
35{
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;
42}
43