group.hpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. // ----------------------------------------------------------------------------
  2. // group.hpp : encapsulates a group of manipulators along with an argument
  3. // ----------------------------------------------------------------------------
  4. // Copyright Samuel Krempp 2003. Use, modification, and distribution are
  5. // subject to the Boost Software License, Version 1.0. (See accompanying
  6. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. // See http://www.boost.org/libs/format for library home page
  8. // ----------------------------------------------------------------------------
  9. // group_head : cut the last element of a group out.
  10. // (is overloaded below on each type of group)
  11. // group_last : returns the last element of a group
  12. // (is overloaded below on each type of group)
  13. // ----------------------------------------------------------------------------
  14. #ifndef BOOST_FORMAT_GROUP_HPP
  15. #define BOOST_FORMAT_GROUP_HPP
  16. #include <boost/config.hpp>
  17. namespace boost {
  18. namespace io {
  19. namespace detail {
  20. // empty group, but useful even though.
  21. struct group0
  22. {
  23. group0() {}
  24. };
  25. template <class Ch, class Tr>
  26. inline
  27. BOOST_IO_STD basic_ostream<Ch, Tr>&
  28. operator << ( BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  29. const group0& )
  30. {
  31. return os;
  32. }
  33. template <class T1>
  34. struct group1
  35. {
  36. T1 a1_;
  37. group1(T1 a1)
  38. : a1_(a1)
  39. {}
  40. private:
  41. group1& operator=(const group1&);
  42. };
  43. template <class Ch, class Tr, class T1>
  44. inline
  45. BOOST_IO_STD basic_ostream<Ch, Tr>&
  46. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  47. const group1<T1>& x)
  48. {
  49. os << x.a1_;
  50. return os;
  51. }
  52. template <class T1,class T2>
  53. struct group2
  54. {
  55. T1 a1_;
  56. T2 a2_;
  57. group2(T1 a1,T2 a2)
  58. : a1_(a1),a2_(a2)
  59. {}
  60. private:
  61. group2& operator=(const group2&);
  62. };
  63. template <class Ch, class Tr, class T1,class T2>
  64. inline
  65. BOOST_IO_STD basic_ostream<Ch, Tr>&
  66. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  67. const group2<T1,T2>& x)
  68. {
  69. os << x.a1_<< x.a2_;
  70. return os;
  71. }
  72. template <class T1,class T2,class T3>
  73. struct group3
  74. {
  75. T1 a1_;
  76. T2 a2_;
  77. T3 a3_;
  78. group3(T1 a1,T2 a2,T3 a3)
  79. : a1_(a1),a2_(a2),a3_(a3)
  80. {}
  81. private:
  82. group3& operator=(const group3&);
  83. };
  84. template <class Ch, class Tr, class T1,class T2,class T3>
  85. inline
  86. BOOST_IO_STD basic_ostream<Ch, Tr>&
  87. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  88. const group3<T1,T2,T3>& x)
  89. {
  90. os << x.a1_<< x.a2_<< x.a3_;
  91. return os;
  92. }
  93. template <class T1,class T2,class T3,class T4>
  94. struct group4
  95. {
  96. T1 a1_;
  97. T2 a2_;
  98. T3 a3_;
  99. T4 a4_;
  100. group4(T1 a1,T2 a2,T3 a3,T4 a4)
  101. : a1_(a1),a2_(a2),a3_(a3),a4_(a4)
  102. {}
  103. private:
  104. group4& operator=(const group4&);
  105. };
  106. template <class Ch, class Tr, class T1,class T2,class T3,class T4>
  107. inline
  108. BOOST_IO_STD basic_ostream<Ch, Tr>&
  109. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  110. const group4<T1,T2,T3,T4>& x)
  111. {
  112. os << x.a1_<< x.a2_<< x.a3_<< x.a4_;
  113. return os;
  114. }
  115. template <class T1,class T2,class T3,class T4,class T5>
  116. struct group5
  117. {
  118. T1 a1_;
  119. T2 a2_;
  120. T3 a3_;
  121. T4 a4_;
  122. T5 a5_;
  123. group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5)
  124. : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5)
  125. {}
  126. };
  127. template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5>
  128. inline
  129. BOOST_IO_STD basic_ostream<Ch, Tr>&
  130. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  131. const group5<T1,T2,T3,T4,T5>& x)
  132. {
  133. os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_;
  134. return os;
  135. }
  136. template <class T1,class T2,class T3,class T4,class T5,class T6>
  137. struct group6
  138. {
  139. T1 a1_;
  140. T2 a2_;
  141. T3 a3_;
  142. T4 a4_;
  143. T5 a5_;
  144. T6 a6_;
  145. group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6)
  146. : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6)
  147. {}
  148. };
  149. template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6>
  150. inline
  151. BOOST_IO_STD basic_ostream<Ch, Tr>&
  152. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  153. const group6<T1,T2,T3,T4,T5,T6>& x)
  154. {
  155. os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_;
  156. return os;
  157. }
  158. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
  159. struct group7
  160. {
  161. T1 a1_;
  162. T2 a2_;
  163. T3 a3_;
  164. T4 a4_;
  165. T5 a5_;
  166. T6 a6_;
  167. T7 a7_;
  168. group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7)
  169. : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7)
  170. {}
  171. };
  172. template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7>
  173. inline
  174. BOOST_IO_STD basic_ostream<Ch, Tr>&
  175. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  176. const group7<T1,T2,T3,T4,T5,T6,T7>& x)
  177. {
  178. os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_;
  179. return os;
  180. }
  181. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
  182. struct group8
  183. {
  184. T1 a1_;
  185. T2 a2_;
  186. T3 a3_;
  187. T4 a4_;
  188. T5 a5_;
  189. T6 a6_;
  190. T7 a7_;
  191. T8 a8_;
  192. group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8)
  193. : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8)
  194. {}
  195. };
  196. template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
  197. inline
  198. BOOST_IO_STD basic_ostream<Ch, Tr>&
  199. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  200. const group8<T1,T2,T3,T4,T5,T6,T7,T8>& x)
  201. {
  202. os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_;
  203. return os;
  204. }
  205. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
  206. struct group9
  207. {
  208. T1 a1_;
  209. T2 a2_;
  210. T3 a3_;
  211. T4 a4_;
  212. T5 a5_;
  213. T6 a6_;
  214. T7 a7_;
  215. T8 a8_;
  216. T9 a9_;
  217. group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9)
  218. : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9)
  219. {}
  220. };
  221. template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
  222. inline
  223. BOOST_IO_STD basic_ostream<Ch, Tr>&
  224. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  225. const group9<T1,T2,T3,T4,T5,T6,T7,T8,T9>& x)
  226. {
  227. os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_;
  228. return os;
  229. }
  230. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
  231. struct group10
  232. {
  233. T1 a1_;
  234. T2 a2_;
  235. T3 a3_;
  236. T4 a4_;
  237. T5 a5_;
  238. T6 a6_;
  239. T7 a7_;
  240. T8 a8_;
  241. T9 a9_;
  242. T10 a10_;
  243. group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10)
  244. : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10)
  245. {}
  246. };
  247. template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
  248. inline
  249. BOOST_IO_STD basic_ostream<Ch, Tr>&
  250. operator << (BOOST_IO_STD basic_ostream<Ch, Tr>& os,
  251. const group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>& x)
  252. {
  253. os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_;
  254. return os;
  255. }
  256. template <class T1,class T2>
  257. inline
  258. group1<T1>
  259. group_head( group2<T1,T2> const& x)
  260. {
  261. return group1<T1> (x.a1_);
  262. }
  263. template <class T1,class T2>
  264. inline
  265. group1<T2>
  266. group_last( group2<T1,T2> const& x)
  267. {
  268. return group1<T2> (x.a2_);
  269. }
  270. template <class T1,class T2,class T3>
  271. inline
  272. group2<T1,T2>
  273. group_head( group3<T1,T2,T3> const& x)
  274. {
  275. return group2<T1,T2> (x.a1_,x.a2_);
  276. }
  277. template <class T1,class T2,class T3>
  278. inline
  279. group1<T3>
  280. group_last( group3<T1,T2,T3> const& x)
  281. {
  282. return group1<T3> (x.a3_);
  283. }
  284. template <class T1,class T2,class T3,class T4>
  285. inline
  286. group3<T1,T2,T3>
  287. group_head( group4<T1,T2,T3,T4> const& x)
  288. {
  289. return group3<T1,T2,T3> (x.a1_,x.a2_,x.a3_);
  290. }
  291. template <class T1,class T2,class T3,class T4>
  292. inline
  293. group1<T4>
  294. group_last( group4<T1,T2,T3,T4> const& x)
  295. {
  296. return group1<T4> (x.a4_);
  297. }
  298. template <class T1,class T2,class T3,class T4,class T5>
  299. inline
  300. group4<T1,T2,T3,T4>
  301. group_head( group5<T1,T2,T3,T4,T5> const& x)
  302. {
  303. return group4<T1,T2,T3,T4> (x.a1_,x.a2_,x.a3_,x.a4_);
  304. }
  305. template <class T1,class T2,class T3,class T4,class T5>
  306. inline
  307. group1<T5>
  308. group_last( group5<T1,T2,T3,T4,T5> const& x)
  309. {
  310. return group1<T5> (x.a5_);
  311. }
  312. template <class T1,class T2,class T3,class T4,class T5,class T6>
  313. inline
  314. group5<T1,T2,T3,T4,T5>
  315. group_head( group6<T1,T2,T3,T4,T5,T6> const& x)
  316. {
  317. return group5<T1,T2,T3,T4,T5> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_);
  318. }
  319. template <class T1,class T2,class T3,class T4,class T5,class T6>
  320. inline
  321. group1<T6>
  322. group_last( group6<T1,T2,T3,T4,T5,T6> const& x)
  323. {
  324. return group1<T6> (x.a6_);
  325. }
  326. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
  327. inline
  328. group6<T1,T2,T3,T4,T5,T6>
  329. group_head( group7<T1,T2,T3,T4,T5,T6,T7> const& x)
  330. {
  331. return group6<T1,T2,T3,T4,T5,T6> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_);
  332. }
  333. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7>
  334. inline
  335. group1<T7>
  336. group_last( group7<T1,T2,T3,T4,T5,T6,T7> const& x)
  337. {
  338. return group1<T7> (x.a7_);
  339. }
  340. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
  341. inline
  342. group7<T1,T2,T3,T4,T5,T6,T7>
  343. group_head( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x)
  344. {
  345. return group7<T1,T2,T3,T4,T5,T6,T7> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_);
  346. }
  347. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8>
  348. inline
  349. group1<T8>
  350. group_last( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x)
  351. {
  352. return group1<T8> (x.a8_);
  353. }
  354. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
  355. inline
  356. group8<T1,T2,T3,T4,T5,T6,T7,T8>
  357. group_head( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x)
  358. {
  359. return group8<T1,T2,T3,T4,T5,T6,T7,T8> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_);
  360. }
  361. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9>
  362. inline
  363. group1<T9>
  364. group_last( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x)
  365. {
  366. return group1<T9> (x.a9_);
  367. }
  368. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
  369. inline
  370. group9<T1,T2,T3,T4,T5,T6,T7,T8,T9>
  371. group_head( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x)
  372. {
  373. return group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_,x.a9_);
  374. }
  375. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10>
  376. inline
  377. group1<T10>
  378. group_last( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x)
  379. {
  380. return group1<T10> (x.a10_);
  381. }
  382. } // namespace detail
  383. // helper functions
  384. inline detail::group1< detail::group0 >
  385. group() { return detail::group1< detail::group0 > ( detail::group0() ); }
  386. template <class T1, class Var>
  387. inline
  388. detail::group1< detail::group2<T1, Var const&> >
  389. group(T1 a1, Var const& var)
  390. {
  391. return detail::group1< detail::group2<T1, Var const&> >
  392. ( detail::group2<T1, Var const&>
  393. (a1, var)
  394. );
  395. }
  396. template <class T1,class T2, class Var>
  397. inline
  398. detail::group1< detail::group3<T1,T2, Var const&> >
  399. group(T1 a1,T2 a2, Var const& var)
  400. {
  401. return detail::group1< detail::group3<T1,T2, Var const&> >
  402. ( detail::group3<T1,T2, Var const&>
  403. (a1,a2, var)
  404. );
  405. }
  406. template <class T1,class T2,class T3, class Var>
  407. inline
  408. detail::group1< detail::group4<T1,T2,T3, Var const&> >
  409. group(T1 a1,T2 a2,T3 a3, Var const& var)
  410. {
  411. return detail::group1< detail::group4<T1,T2,T3, Var const&> >
  412. ( detail::group4<T1,T2,T3, Var const&>
  413. (a1,a2,a3, var)
  414. );
  415. }
  416. template <class T1,class T2,class T3,class T4, class Var>
  417. inline
  418. detail::group1< detail::group5<T1,T2,T3,T4, Var const&> >
  419. group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var)
  420. {
  421. return detail::group1< detail::group5<T1,T2,T3,T4, Var const&> >
  422. ( detail::group5<T1,T2,T3,T4, Var const&>
  423. (a1,a2,a3,a4, var)
  424. );
  425. }
  426. template <class T1,class T2,class T3,class T4,class T5, class Var>
  427. inline
  428. detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> >
  429. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var)
  430. {
  431. return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> >
  432. ( detail::group6<T1,T2,T3,T4,T5, Var const&>
  433. (a1,a2,a3,a4,a5, var)
  434. );
  435. }
  436. template <class T1,class T2,class T3,class T4,class T5,class T6, class Var>
  437. inline
  438. detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> >
  439. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var)
  440. {
  441. return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> >
  442. ( detail::group7<T1,T2,T3,T4,T5,T6, Var const&>
  443. (a1,a2,a3,a4,a5,a6, var)
  444. );
  445. }
  446. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var>
  447. inline
  448. detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> >
  449. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var)
  450. {
  451. return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> >
  452. ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&>
  453. (a1,a2,a3,a4,a5,a6,a7, var)
  454. );
  455. }
  456. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var>
  457. inline
  458. detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> >
  459. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var)
  460. {
  461. return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> >
  462. ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&>
  463. (a1,a2,a3,a4,a5,a6,a7,a8, var)
  464. );
  465. }
  466. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var>
  467. inline
  468. detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> >
  469. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var)
  470. {
  471. return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> >
  472. ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&>
  473. (a1,a2,a3,a4,a5,a6,a7,a8,a9, var)
  474. );
  475. }
  476. #ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
  477. template <class T1, class Var>
  478. inline
  479. detail::group1< detail::group2<T1, Var&> >
  480. group(T1 a1, Var& var)
  481. {
  482. return detail::group1< detail::group2<T1, Var&> >
  483. ( detail::group2<T1, Var&>
  484. (a1, var)
  485. );
  486. }
  487. template <class T1,class T2, class Var>
  488. inline
  489. detail::group1< detail::group3<T1,T2, Var&> >
  490. group(T1 a1,T2 a2, Var& var)
  491. {
  492. return detail::group1< detail::group3<T1,T2, Var&> >
  493. ( detail::group3<T1,T2, Var&>
  494. (a1,a2, var)
  495. );
  496. }
  497. template <class T1,class T2,class T3, class Var>
  498. inline
  499. detail::group1< detail::group4<T1,T2,T3, Var&> >
  500. group(T1 a1,T2 a2,T3 a3, Var& var)
  501. {
  502. return detail::group1< detail::group4<T1,T2,T3, Var&> >
  503. ( detail::group4<T1,T2,T3, Var&>
  504. (a1,a2,a3, var)
  505. );
  506. }
  507. template <class T1,class T2,class T3,class T4, class Var>
  508. inline
  509. detail::group1< detail::group5<T1,T2,T3,T4, Var&> >
  510. group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var)
  511. {
  512. return detail::group1< detail::group5<T1,T2,T3,T4, Var&> >
  513. ( detail::group5<T1,T2,T3,T4, Var&>
  514. (a1,a2,a3,a4, var)
  515. );
  516. }
  517. template <class T1,class T2,class T3,class T4,class T5, class Var>
  518. inline
  519. detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> >
  520. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var)
  521. {
  522. return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> >
  523. ( detail::group6<T1,T2,T3,T4,T5, Var&>
  524. (a1,a2,a3,a4,a5, var)
  525. );
  526. }
  527. template <class T1,class T2,class T3,class T4,class T5,class T6, class Var>
  528. inline
  529. detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> >
  530. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var)
  531. {
  532. return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> >
  533. ( detail::group7<T1,T2,T3,T4,T5,T6, Var&>
  534. (a1,a2,a3,a4,a5,a6, var)
  535. );
  536. }
  537. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var>
  538. inline
  539. detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> >
  540. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var)
  541. {
  542. return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> >
  543. ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&>
  544. (a1,a2,a3,a4,a5,a6,a7, var)
  545. );
  546. }
  547. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var>
  548. inline
  549. detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> >
  550. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var)
  551. {
  552. return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> >
  553. ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&>
  554. (a1,a2,a3,a4,a5,a6,a7,a8, var)
  555. );
  556. }
  557. template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var>
  558. inline
  559. detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> >
  560. group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var)
  561. {
  562. return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> >
  563. ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&>
  564. (a1,a2,a3,a4,a5,a6,a7,a8,a9, var)
  565. );
  566. }
  567. #endif // - BOOST_NO_OVERLOAD_FOR_NON_CONST
  568. } // namespace io
  569. } // namespace boost
  570. #endif // BOOST_FORMAT_GROUP_HPP