group.hpp 17 KB

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