pool_construct.ipp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852
  1. // Copyright (C) 2000 Stephen Cleary
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompany-
  4. // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // See http://www.boost.org for updates, documentation, and revision history.
  7. // This file was AUTOMATICALLY GENERATED from "stdin"
  8. // Do NOT include directly!
  9. // Do NOT edit!
  10. template <typename T0>
  11. element_type * construct(T0 & a0)
  12. {
  13. element_type * const ret = (malloc)();
  14. if (ret == 0)
  15. return ret;
  16. try { new (ret) element_type(a0); }
  17. catch (...) { (free)(ret); throw; }
  18. return ret;
  19. }
  20. template <typename T0>
  21. element_type * construct(const T0 & a0)
  22. {
  23. element_type * const ret = (malloc)();
  24. if (ret == 0)
  25. return ret;
  26. try { new (ret) element_type(a0); }
  27. catch (...) { (free)(ret); throw; }
  28. return ret;
  29. }
  30. template <typename T0>
  31. element_type * construct(volatile T0 & a0)
  32. {
  33. element_type * const ret = (malloc)();
  34. if (ret == 0)
  35. return ret;
  36. try { new (ret) element_type(a0); }
  37. catch (...) { (free)(ret); throw; }
  38. return ret;
  39. }
  40. template <typename T0>
  41. element_type * construct(const volatile T0 & a0)
  42. {
  43. element_type * const ret = (malloc)();
  44. if (ret == 0)
  45. return ret;
  46. try { new (ret) element_type(a0); }
  47. catch (...) { (free)(ret); throw; }
  48. return ret;
  49. }
  50. template <typename T0, typename T1>
  51. element_type * construct(T0 & a0, T1 & a1)
  52. {
  53. element_type * const ret = (malloc)();
  54. if (ret == 0)
  55. return ret;
  56. try { new (ret) element_type(a0, a1); }
  57. catch (...) { (free)(ret); throw; }
  58. return ret;
  59. }
  60. template <typename T0, typename T1>
  61. element_type * construct(const T0 & a0, T1 & a1)
  62. {
  63. element_type * const ret = (malloc)();
  64. if (ret == 0)
  65. return ret;
  66. try { new (ret) element_type(a0, a1); }
  67. catch (...) { (free)(ret); throw; }
  68. return ret;
  69. }
  70. template <typename T0, typename T1>
  71. element_type * construct(volatile T0 & a0, T1 & a1)
  72. {
  73. element_type * const ret = (malloc)();
  74. if (ret == 0)
  75. return ret;
  76. try { new (ret) element_type(a0, a1); }
  77. catch (...) { (free)(ret); throw; }
  78. return ret;
  79. }
  80. template <typename T0, typename T1>
  81. element_type * construct(const volatile T0 & a0, T1 & a1)
  82. {
  83. element_type * const ret = (malloc)();
  84. if (ret == 0)
  85. return ret;
  86. try { new (ret) element_type(a0, a1); }
  87. catch (...) { (free)(ret); throw; }
  88. return ret;
  89. }
  90. template <typename T0, typename T1>
  91. element_type * construct(T0 & a0, const T1 & a1)
  92. {
  93. element_type * const ret = (malloc)();
  94. if (ret == 0)
  95. return ret;
  96. try { new (ret) element_type(a0, a1); }
  97. catch (...) { (free)(ret); throw; }
  98. return ret;
  99. }
  100. template <typename T0, typename T1>
  101. element_type * construct(const T0 & a0, const T1 & a1)
  102. {
  103. element_type * const ret = (malloc)();
  104. if (ret == 0)
  105. return ret;
  106. try { new (ret) element_type(a0, a1); }
  107. catch (...) { (free)(ret); throw; }
  108. return ret;
  109. }
  110. template <typename T0, typename T1>
  111. element_type * construct(volatile T0 & a0, const T1 & a1)
  112. {
  113. element_type * const ret = (malloc)();
  114. if (ret == 0)
  115. return ret;
  116. try { new (ret) element_type(a0, a1); }
  117. catch (...) { (free)(ret); throw; }
  118. return ret;
  119. }
  120. template <typename T0, typename T1>
  121. element_type * construct(const volatile T0 & a0, const T1 & a1)
  122. {
  123. element_type * const ret = (malloc)();
  124. if (ret == 0)
  125. return ret;
  126. try { new (ret) element_type(a0, a1); }
  127. catch (...) { (free)(ret); throw; }
  128. return ret;
  129. }
  130. template <typename T0, typename T1>
  131. element_type * construct(T0 & a0, volatile T1 & a1)
  132. {
  133. element_type * const ret = (malloc)();
  134. if (ret == 0)
  135. return ret;
  136. try { new (ret) element_type(a0, a1); }
  137. catch (...) { (free)(ret); throw; }
  138. return ret;
  139. }
  140. template <typename T0, typename T1>
  141. element_type * construct(const T0 & a0, volatile T1 & a1)
  142. {
  143. element_type * const ret = (malloc)();
  144. if (ret == 0)
  145. return ret;
  146. try { new (ret) element_type(a0, a1); }
  147. catch (...) { (free)(ret); throw; }
  148. return ret;
  149. }
  150. template <typename T0, typename T1>
  151. element_type * construct(volatile T0 & a0, volatile T1 & a1)
  152. {
  153. element_type * const ret = (malloc)();
  154. if (ret == 0)
  155. return ret;
  156. try { new (ret) element_type(a0, a1); }
  157. catch (...) { (free)(ret); throw; }
  158. return ret;
  159. }
  160. template <typename T0, typename T1>
  161. element_type * construct(const volatile T0 & a0, volatile T1 & a1)
  162. {
  163. element_type * const ret = (malloc)();
  164. if (ret == 0)
  165. return ret;
  166. try { new (ret) element_type(a0, a1); }
  167. catch (...) { (free)(ret); throw; }
  168. return ret;
  169. }
  170. template <typename T0, typename T1>
  171. element_type * construct(T0 & a0, const volatile T1 & a1)
  172. {
  173. element_type * const ret = (malloc)();
  174. if (ret == 0)
  175. return ret;
  176. try { new (ret) element_type(a0, a1); }
  177. catch (...) { (free)(ret); throw; }
  178. return ret;
  179. }
  180. template <typename T0, typename T1>
  181. element_type * construct(const T0 & a0, const volatile T1 & a1)
  182. {
  183. element_type * const ret = (malloc)();
  184. if (ret == 0)
  185. return ret;
  186. try { new (ret) element_type(a0, a1); }
  187. catch (...) { (free)(ret); throw; }
  188. return ret;
  189. }
  190. template <typename T0, typename T1>
  191. element_type * construct(volatile T0 & a0, const volatile T1 & a1)
  192. {
  193. element_type * const ret = (malloc)();
  194. if (ret == 0)
  195. return ret;
  196. try { new (ret) element_type(a0, a1); }
  197. catch (...) { (free)(ret); throw; }
  198. return ret;
  199. }
  200. template <typename T0, typename T1>
  201. element_type * construct(const volatile T0 & a0, const volatile T1 & a1)
  202. {
  203. element_type * const ret = (malloc)();
  204. if (ret == 0)
  205. return ret;
  206. try { new (ret) element_type(a0, a1); }
  207. catch (...) { (free)(ret); throw; }
  208. return ret;
  209. }
  210. template <typename T0, typename T1, typename T2>
  211. element_type * construct(T0 & a0, T1 & a1, T2 & a2)
  212. {
  213. element_type * const ret = (malloc)();
  214. if (ret == 0)
  215. return ret;
  216. try { new (ret) element_type(a0, a1, a2); }
  217. catch (...) { (free)(ret); throw; }
  218. return ret;
  219. }
  220. template <typename T0, typename T1, typename T2>
  221. element_type * construct(const T0 & a0, T1 & a1, T2 & a2)
  222. {
  223. element_type * const ret = (malloc)();
  224. if (ret == 0)
  225. return ret;
  226. try { new (ret) element_type(a0, a1, a2); }
  227. catch (...) { (free)(ret); throw; }
  228. return ret;
  229. }
  230. template <typename T0, typename T1, typename T2>
  231. element_type * construct(volatile T0 & a0, T1 & a1, T2 & a2)
  232. {
  233. element_type * const ret = (malloc)();
  234. if (ret == 0)
  235. return ret;
  236. try { new (ret) element_type(a0, a1, a2); }
  237. catch (...) { (free)(ret); throw; }
  238. return ret;
  239. }
  240. template <typename T0, typename T1, typename T2>
  241. element_type * construct(const volatile T0 & a0, T1 & a1, T2 & a2)
  242. {
  243. element_type * const ret = (malloc)();
  244. if (ret == 0)
  245. return ret;
  246. try { new (ret) element_type(a0, a1, a2); }
  247. catch (...) { (free)(ret); throw; }
  248. return ret;
  249. }
  250. template <typename T0, typename T1, typename T2>
  251. element_type * construct(T0 & a0, const T1 & a1, T2 & a2)
  252. {
  253. element_type * const ret = (malloc)();
  254. if (ret == 0)
  255. return ret;
  256. try { new (ret) element_type(a0, a1, a2); }
  257. catch (...) { (free)(ret); throw; }
  258. return ret;
  259. }
  260. template <typename T0, typename T1, typename T2>
  261. element_type * construct(const T0 & a0, const T1 & a1, T2 & a2)
  262. {
  263. element_type * const ret = (malloc)();
  264. if (ret == 0)
  265. return ret;
  266. try { new (ret) element_type(a0, a1, a2); }
  267. catch (...) { (free)(ret); throw; }
  268. return ret;
  269. }
  270. template <typename T0, typename T1, typename T2>
  271. element_type * construct(volatile T0 & a0, const T1 & a1, T2 & a2)
  272. {
  273. element_type * const ret = (malloc)();
  274. if (ret == 0)
  275. return ret;
  276. try { new (ret) element_type(a0, a1, a2); }
  277. catch (...) { (free)(ret); throw; }
  278. return ret;
  279. }
  280. template <typename T0, typename T1, typename T2>
  281. element_type * construct(const volatile T0 & a0, const T1 & a1, T2 & a2)
  282. {
  283. element_type * const ret = (malloc)();
  284. if (ret == 0)
  285. return ret;
  286. try { new (ret) element_type(a0, a1, a2); }
  287. catch (...) { (free)(ret); throw; }
  288. return ret;
  289. }
  290. template <typename T0, typename T1, typename T2>
  291. element_type * construct(T0 & a0, volatile T1 & a1, T2 & a2)
  292. {
  293. element_type * const ret = (malloc)();
  294. if (ret == 0)
  295. return ret;
  296. try { new (ret) element_type(a0, a1, a2); }
  297. catch (...) { (free)(ret); throw; }
  298. return ret;
  299. }
  300. template <typename T0, typename T1, typename T2>
  301. element_type * construct(const T0 & a0, volatile T1 & a1, T2 & a2)
  302. {
  303. element_type * const ret = (malloc)();
  304. if (ret == 0)
  305. return ret;
  306. try { new (ret) element_type(a0, a1, a2); }
  307. catch (...) { (free)(ret); throw; }
  308. return ret;
  309. }
  310. template <typename T0, typename T1, typename T2>
  311. element_type * construct(volatile T0 & a0, volatile T1 & a1, T2 & a2)
  312. {
  313. element_type * const ret = (malloc)();
  314. if (ret == 0)
  315. return ret;
  316. try { new (ret) element_type(a0, a1, a2); }
  317. catch (...) { (free)(ret); throw; }
  318. return ret;
  319. }
  320. template <typename T0, typename T1, typename T2>
  321. element_type * construct(const volatile T0 & a0, volatile T1 & a1, T2 & a2)
  322. {
  323. element_type * const ret = (malloc)();
  324. if (ret == 0)
  325. return ret;
  326. try { new (ret) element_type(a0, a1, a2); }
  327. catch (...) { (free)(ret); throw; }
  328. return ret;
  329. }
  330. template <typename T0, typename T1, typename T2>
  331. element_type * construct(T0 & a0, const volatile T1 & a1, T2 & a2)
  332. {
  333. element_type * const ret = (malloc)();
  334. if (ret == 0)
  335. return ret;
  336. try { new (ret) element_type(a0, a1, a2); }
  337. catch (...) { (free)(ret); throw; }
  338. return ret;
  339. }
  340. template <typename T0, typename T1, typename T2>
  341. element_type * construct(const T0 & a0, const volatile T1 & a1, T2 & a2)
  342. {
  343. element_type * const ret = (malloc)();
  344. if (ret == 0)
  345. return ret;
  346. try { new (ret) element_type(a0, a1, a2); }
  347. catch (...) { (free)(ret); throw; }
  348. return ret;
  349. }
  350. template <typename T0, typename T1, typename T2>
  351. element_type * construct(volatile T0 & a0, const volatile T1 & a1, T2 & a2)
  352. {
  353. element_type * const ret = (malloc)();
  354. if (ret == 0)
  355. return ret;
  356. try { new (ret) element_type(a0, a1, a2); }
  357. catch (...) { (free)(ret); throw; }
  358. return ret;
  359. }
  360. template <typename T0, typename T1, typename T2>
  361. element_type * construct(const volatile T0 & a0, const volatile T1 & a1, T2 & a2)
  362. {
  363. element_type * const ret = (malloc)();
  364. if (ret == 0)
  365. return ret;
  366. try { new (ret) element_type(a0, a1, a2); }
  367. catch (...) { (free)(ret); throw; }
  368. return ret;
  369. }
  370. template <typename T0, typename T1, typename T2>
  371. element_type * construct(T0 & a0, T1 & a1, const T2 & a2)
  372. {
  373. element_type * const ret = (malloc)();
  374. if (ret == 0)
  375. return ret;
  376. try { new (ret) element_type(a0, a1, a2); }
  377. catch (...) { (free)(ret); throw; }
  378. return ret;
  379. }
  380. template <typename T0, typename T1, typename T2>
  381. element_type * construct(const T0 & a0, T1 & a1, const T2 & a2)
  382. {
  383. element_type * const ret = (malloc)();
  384. if (ret == 0)
  385. return ret;
  386. try { new (ret) element_type(a0, a1, a2); }
  387. catch (...) { (free)(ret); throw; }
  388. return ret;
  389. }
  390. template <typename T0, typename T1, typename T2>
  391. element_type * construct(volatile T0 & a0, T1 & a1, const T2 & a2)
  392. {
  393. element_type * const ret = (malloc)();
  394. if (ret == 0)
  395. return ret;
  396. try { new (ret) element_type(a0, a1, a2); }
  397. catch (...) { (free)(ret); throw; }
  398. return ret;
  399. }
  400. template <typename T0, typename T1, typename T2>
  401. element_type * construct(const volatile T0 & a0, T1 & a1, const T2 & a2)
  402. {
  403. element_type * const ret = (malloc)();
  404. if (ret == 0)
  405. return ret;
  406. try { new (ret) element_type(a0, a1, a2); }
  407. catch (...) { (free)(ret); throw; }
  408. return ret;
  409. }
  410. template <typename T0, typename T1, typename T2>
  411. element_type * construct(T0 & a0, const T1 & a1, const T2 & a2)
  412. {
  413. element_type * const ret = (malloc)();
  414. if (ret == 0)
  415. return ret;
  416. try { new (ret) element_type(a0, a1, a2); }
  417. catch (...) { (free)(ret); throw; }
  418. return ret;
  419. }
  420. template <typename T0, typename T1, typename T2>
  421. element_type * construct(const T0 & a0, const T1 & a1, const T2 & a2)
  422. {
  423. element_type * const ret = (malloc)();
  424. if (ret == 0)
  425. return ret;
  426. try { new (ret) element_type(a0, a1, a2); }
  427. catch (...) { (free)(ret); throw; }
  428. return ret;
  429. }
  430. template <typename T0, typename T1, typename T2>
  431. element_type * construct(volatile T0 & a0, const T1 & a1, const T2 & a2)
  432. {
  433. element_type * const ret = (malloc)();
  434. if (ret == 0)
  435. return ret;
  436. try { new (ret) element_type(a0, a1, a2); }
  437. catch (...) { (free)(ret); throw; }
  438. return ret;
  439. }
  440. template <typename T0, typename T1, typename T2>
  441. element_type * construct(const volatile T0 & a0, const T1 & a1, const T2 & a2)
  442. {
  443. element_type * const ret = (malloc)();
  444. if (ret == 0)
  445. return ret;
  446. try { new (ret) element_type(a0, a1, a2); }
  447. catch (...) { (free)(ret); throw; }
  448. return ret;
  449. }
  450. template <typename T0, typename T1, typename T2>
  451. element_type * construct(T0 & a0, volatile T1 & a1, const T2 & a2)
  452. {
  453. element_type * const ret = (malloc)();
  454. if (ret == 0)
  455. return ret;
  456. try { new (ret) element_type(a0, a1, a2); }
  457. catch (...) { (free)(ret); throw; }
  458. return ret;
  459. }
  460. template <typename T0, typename T1, typename T2>
  461. element_type * construct(const T0 & a0, volatile T1 & a1, const T2 & a2)
  462. {
  463. element_type * const ret = (malloc)();
  464. if (ret == 0)
  465. return ret;
  466. try { new (ret) element_type(a0, a1, a2); }
  467. catch (...) { (free)(ret); throw; }
  468. return ret;
  469. }
  470. template <typename T0, typename T1, typename T2>
  471. element_type * construct(volatile T0 & a0, volatile T1 & a1, const T2 & a2)
  472. {
  473. element_type * const ret = (malloc)();
  474. if (ret == 0)
  475. return ret;
  476. try { new (ret) element_type(a0, a1, a2); }
  477. catch (...) { (free)(ret); throw; }
  478. return ret;
  479. }
  480. template <typename T0, typename T1, typename T2>
  481. element_type * construct(const volatile T0 & a0, volatile T1 & a1, const T2 & a2)
  482. {
  483. element_type * const ret = (malloc)();
  484. if (ret == 0)
  485. return ret;
  486. try { new (ret) element_type(a0, a1, a2); }
  487. catch (...) { (free)(ret); throw; }
  488. return ret;
  489. }
  490. template <typename T0, typename T1, typename T2>
  491. element_type * construct(T0 & a0, const volatile T1 & a1, const T2 & a2)
  492. {
  493. element_type * const ret = (malloc)();
  494. if (ret == 0)
  495. return ret;
  496. try { new (ret) element_type(a0, a1, a2); }
  497. catch (...) { (free)(ret); throw; }
  498. return ret;
  499. }
  500. template <typename T0, typename T1, typename T2>
  501. element_type * construct(const T0 & a0, const volatile T1 & a1, const T2 & a2)
  502. {
  503. element_type * const ret = (malloc)();
  504. if (ret == 0)
  505. return ret;
  506. try { new (ret) element_type(a0, a1, a2); }
  507. catch (...) { (free)(ret); throw; }
  508. return ret;
  509. }
  510. template <typename T0, typename T1, typename T2>
  511. element_type * construct(volatile T0 & a0, const volatile T1 & a1, const T2 & a2)
  512. {
  513. element_type * const ret = (malloc)();
  514. if (ret == 0)
  515. return ret;
  516. try { new (ret) element_type(a0, a1, a2); }
  517. catch (...) { (free)(ret); throw; }
  518. return ret;
  519. }
  520. template <typename T0, typename T1, typename T2>
  521. element_type * construct(const volatile T0 & a0, const volatile T1 & a1, const T2 & a2)
  522. {
  523. element_type * const ret = (malloc)();
  524. if (ret == 0)
  525. return ret;
  526. try { new (ret) element_type(a0, a1, a2); }
  527. catch (...) { (free)(ret); throw; }
  528. return ret;
  529. }
  530. template <typename T0, typename T1, typename T2>
  531. element_type * construct(T0 & a0, T1 & a1, volatile T2 & a2)
  532. {
  533. element_type * const ret = (malloc)();
  534. if (ret == 0)
  535. return ret;
  536. try { new (ret) element_type(a0, a1, a2); }
  537. catch (...) { (free)(ret); throw; }
  538. return ret;
  539. }
  540. template <typename T0, typename T1, typename T2>
  541. element_type * construct(const T0 & a0, T1 & a1, volatile T2 & a2)
  542. {
  543. element_type * const ret = (malloc)();
  544. if (ret == 0)
  545. return ret;
  546. try { new (ret) element_type(a0, a1, a2); }
  547. catch (...) { (free)(ret); throw; }
  548. return ret;
  549. }
  550. template <typename T0, typename T1, typename T2>
  551. element_type * construct(volatile T0 & a0, T1 & a1, volatile T2 & a2)
  552. {
  553. element_type * const ret = (malloc)();
  554. if (ret == 0)
  555. return ret;
  556. try { new (ret) element_type(a0, a1, a2); }
  557. catch (...) { (free)(ret); throw; }
  558. return ret;
  559. }
  560. template <typename T0, typename T1, typename T2>
  561. element_type * construct(const volatile T0 & a0, T1 & a1, volatile T2 & a2)
  562. {
  563. element_type * const ret = (malloc)();
  564. if (ret == 0)
  565. return ret;
  566. try { new (ret) element_type(a0, a1, a2); }
  567. catch (...) { (free)(ret); throw; }
  568. return ret;
  569. }
  570. template <typename T0, typename T1, typename T2>
  571. element_type * construct(T0 & a0, const T1 & a1, volatile T2 & a2)
  572. {
  573. element_type * const ret = (malloc)();
  574. if (ret == 0)
  575. return ret;
  576. try { new (ret) element_type(a0, a1, a2); }
  577. catch (...) { (free)(ret); throw; }
  578. return ret;
  579. }
  580. template <typename T0, typename T1, typename T2>
  581. element_type * construct(const T0 & a0, const T1 & a1, volatile T2 & a2)
  582. {
  583. element_type * const ret = (malloc)();
  584. if (ret == 0)
  585. return ret;
  586. try { new (ret) element_type(a0, a1, a2); }
  587. catch (...) { (free)(ret); throw; }
  588. return ret;
  589. }
  590. template <typename T0, typename T1, typename T2>
  591. element_type * construct(volatile T0 & a0, const T1 & a1, volatile T2 & a2)
  592. {
  593. element_type * const ret = (malloc)();
  594. if (ret == 0)
  595. return ret;
  596. try { new (ret) element_type(a0, a1, a2); }
  597. catch (...) { (free)(ret); throw; }
  598. return ret;
  599. }
  600. template <typename T0, typename T1, typename T2>
  601. element_type * construct(const volatile T0 & a0, const T1 & a1, volatile T2 & a2)
  602. {
  603. element_type * const ret = (malloc)();
  604. if (ret == 0)
  605. return ret;
  606. try { new (ret) element_type(a0, a1, a2); }
  607. catch (...) { (free)(ret); throw; }
  608. return ret;
  609. }
  610. template <typename T0, typename T1, typename T2>
  611. element_type * construct(T0 & a0, volatile T1 & a1, volatile T2 & a2)
  612. {
  613. element_type * const ret = (malloc)();
  614. if (ret == 0)
  615. return ret;
  616. try { new (ret) element_type(a0, a1, a2); }
  617. catch (...) { (free)(ret); throw; }
  618. return ret;
  619. }
  620. template <typename T0, typename T1, typename T2>
  621. element_type * construct(const T0 & a0, volatile T1 & a1, volatile T2 & a2)
  622. {
  623. element_type * const ret = (malloc)();
  624. if (ret == 0)
  625. return ret;
  626. try { new (ret) element_type(a0, a1, a2); }
  627. catch (...) { (free)(ret); throw; }
  628. return ret;
  629. }
  630. template <typename T0, typename T1, typename T2>
  631. element_type * construct(volatile T0 & a0, volatile T1 & a1, volatile T2 & a2)
  632. {
  633. element_type * const ret = (malloc)();
  634. if (ret == 0)
  635. return ret;
  636. try { new (ret) element_type(a0, a1, a2); }
  637. catch (...) { (free)(ret); throw; }
  638. return ret;
  639. }
  640. template <typename T0, typename T1, typename T2>
  641. element_type * construct(const volatile T0 & a0, volatile T1 & a1, volatile T2 & a2)
  642. {
  643. element_type * const ret = (malloc)();
  644. if (ret == 0)
  645. return ret;
  646. try { new (ret) element_type(a0, a1, a2); }
  647. catch (...) { (free)(ret); throw; }
  648. return ret;
  649. }
  650. template <typename T0, typename T1, typename T2>
  651. element_type * construct(T0 & a0, const volatile T1 & a1, volatile T2 & a2)
  652. {
  653. element_type * const ret = (malloc)();
  654. if (ret == 0)
  655. return ret;
  656. try { new (ret) element_type(a0, a1, a2); }
  657. catch (...) { (free)(ret); throw; }
  658. return ret;
  659. }
  660. template <typename T0, typename T1, typename T2>
  661. element_type * construct(const T0 & a0, const volatile T1 & a1, volatile T2 & a2)
  662. {
  663. element_type * const ret = (malloc)();
  664. if (ret == 0)
  665. return ret;
  666. try { new (ret) element_type(a0, a1, a2); }
  667. catch (...) { (free)(ret); throw; }
  668. return ret;
  669. }
  670. template <typename T0, typename T1, typename T2>
  671. element_type * construct(volatile T0 & a0, const volatile T1 & a1, volatile T2 & a2)
  672. {
  673. element_type * const ret = (malloc)();
  674. if (ret == 0)
  675. return ret;
  676. try { new (ret) element_type(a0, a1, a2); }
  677. catch (...) { (free)(ret); throw; }
  678. return ret;
  679. }
  680. template <typename T0, typename T1, typename T2>
  681. element_type * construct(const volatile T0 & a0, const volatile T1 & a1, volatile T2 & a2)
  682. {
  683. element_type * const ret = (malloc)();
  684. if (ret == 0)
  685. return ret;
  686. try { new (ret) element_type(a0, a1, a2); }
  687. catch (...) { (free)(ret); throw; }
  688. return ret;
  689. }
  690. template <typename T0, typename T1, typename T2>
  691. element_type * construct(T0 & a0, T1 & a1, const volatile T2 & a2)
  692. {
  693. element_type * const ret = (malloc)();
  694. if (ret == 0)
  695. return ret;
  696. try { new (ret) element_type(a0, a1, a2); }
  697. catch (...) { (free)(ret); throw; }
  698. return ret;
  699. }
  700. template <typename T0, typename T1, typename T2>
  701. element_type * construct(const T0 & a0, T1 & a1, const volatile T2 & a2)
  702. {
  703. element_type * const ret = (malloc)();
  704. if (ret == 0)
  705. return ret;
  706. try { new (ret) element_type(a0, a1, a2); }
  707. catch (...) { (free)(ret); throw; }
  708. return ret;
  709. }
  710. template <typename T0, typename T1, typename T2>
  711. element_type * construct(volatile T0 & a0, T1 & a1, const volatile T2 & a2)
  712. {
  713. element_type * const ret = (malloc)();
  714. if (ret == 0)
  715. return ret;
  716. try { new (ret) element_type(a0, a1, a2); }
  717. catch (...) { (free)(ret); throw; }
  718. return ret;
  719. }
  720. template <typename T0, typename T1, typename T2>
  721. element_type * construct(const volatile T0 & a0, T1 & a1, const volatile T2 & a2)
  722. {
  723. element_type * const ret = (malloc)();
  724. if (ret == 0)
  725. return ret;
  726. try { new (ret) element_type(a0, a1, a2); }
  727. catch (...) { (free)(ret); throw; }
  728. return ret;
  729. }
  730. template <typename T0, typename T1, typename T2>
  731. element_type * construct(T0 & a0, const T1 & a1, const volatile T2 & a2)
  732. {
  733. element_type * const ret = (malloc)();
  734. if (ret == 0)
  735. return ret;
  736. try { new (ret) element_type(a0, a1, a2); }
  737. catch (...) { (free)(ret); throw; }
  738. return ret;
  739. }
  740. template <typename T0, typename T1, typename T2>
  741. element_type * construct(const T0 & a0, const T1 & a1, const volatile T2 & a2)
  742. {
  743. element_type * const ret = (malloc)();
  744. if (ret == 0)
  745. return ret;
  746. try { new (ret) element_type(a0, a1, a2); }
  747. catch (...) { (free)(ret); throw; }
  748. return ret;
  749. }
  750. template <typename T0, typename T1, typename T2>
  751. element_type * construct(volatile T0 & a0, const T1 & a1, const volatile T2 & a2)
  752. {
  753. element_type * const ret = (malloc)();
  754. if (ret == 0)
  755. return ret;
  756. try { new (ret) element_type(a0, a1, a2); }
  757. catch (...) { (free)(ret); throw; }
  758. return ret;
  759. }
  760. template <typename T0, typename T1, typename T2>
  761. element_type * construct(const volatile T0 & a0, const T1 & a1, const volatile T2 & a2)
  762. {
  763. element_type * const ret = (malloc)();
  764. if (ret == 0)
  765. return ret;
  766. try { new (ret) element_type(a0, a1, a2); }
  767. catch (...) { (free)(ret); throw; }
  768. return ret;
  769. }
  770. template <typename T0, typename T1, typename T2>
  771. element_type * construct(T0 & a0, volatile T1 & a1, const volatile T2 & a2)
  772. {
  773. element_type * const ret = (malloc)();
  774. if (ret == 0)
  775. return ret;
  776. try { new (ret) element_type(a0, a1, a2); }
  777. catch (...) { (free)(ret); throw; }
  778. return ret;
  779. }
  780. template <typename T0, typename T1, typename T2>
  781. element_type * construct(const T0 & a0, volatile T1 & a1, const volatile T2 & a2)
  782. {
  783. element_type * const ret = (malloc)();
  784. if (ret == 0)
  785. return ret;
  786. try { new (ret) element_type(a0, a1, a2); }
  787. catch (...) { (free)(ret); throw; }
  788. return ret;
  789. }
  790. template <typename T0, typename T1, typename T2>
  791. element_type * construct(volatile T0 & a0, volatile T1 & a1, const volatile T2 & a2)
  792. {
  793. element_type * const ret = (malloc)();
  794. if (ret == 0)
  795. return ret;
  796. try { new (ret) element_type(a0, a1, a2); }
  797. catch (...) { (free)(ret); throw; }
  798. return ret;
  799. }
  800. template <typename T0, typename T1, typename T2>
  801. element_type * construct(const volatile T0 & a0, volatile T1 & a1, const volatile T2 & a2)
  802. {
  803. element_type * const ret = (malloc)();
  804. if (ret == 0)
  805. return ret;
  806. try { new (ret) element_type(a0, a1, a2); }
  807. catch (...) { (free)(ret); throw; }
  808. return ret;
  809. }
  810. template <typename T0, typename T1, typename T2>
  811. element_type * construct(T0 & a0, const volatile T1 & a1, const volatile T2 & a2)
  812. {
  813. element_type * const ret = (malloc)();
  814. if (ret == 0)
  815. return ret;
  816. try { new (ret) element_type(a0, a1, a2); }
  817. catch (...) { (free)(ret); throw; }
  818. return ret;
  819. }
  820. template <typename T0, typename T1, typename T2>
  821. element_type * construct(const T0 & a0, const volatile T1 & a1, const volatile T2 & a2)
  822. {
  823. element_type * const ret = (malloc)();
  824. if (ret == 0)
  825. return ret;
  826. try { new (ret) element_type(a0, a1, a2); }
  827. catch (...) { (free)(ret); throw; }
  828. return ret;
  829. }
  830. template <typename T0, typename T1, typename T2>
  831. element_type * construct(volatile T0 & a0, const volatile T1 & a1, const volatile T2 & a2)
  832. {
  833. element_type * const ret = (malloc)();
  834. if (ret == 0)
  835. return ret;
  836. try { new (ret) element_type(a0, a1, a2); }
  837. catch (...) { (free)(ret); throw; }
  838. return ret;
  839. }
  840. template <typename T0, typename T1, typename T2>
  841. element_type * construct(const volatile T0 & a0, const volatile T1 & a1, const volatile T2 & a2)
  842. {
  843. element_type * const ret = (malloc)();
  844. if (ret == 0)
  845. return ret;
  846. try { new (ret) element_type(a0, a1, a2); }
  847. catch (...) { (free)(ret); throw; }
  848. return ret;
  849. }