container.hpp 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. /*=============================================================================
  2. Copyright (c) 2004 Angus Leeming
  3. Copyright (c) 2004 Joel de Guzman
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #ifndef BOOST_PHOENIX_STL_CONTAINER_CONTAINER_HPP
  8. #define BOOST_PHOENIX_STL_CONTAINER_CONTAINER_HPP
  9. #include <boost/phoenix/core/limits.hpp>
  10. #include <boost/mpl/and.hpp>
  11. #include <boost/mpl/not.hpp>
  12. #include <boost/mpl/or.hpp>
  13. #include <boost/mpl/void.hpp>
  14. #include <boost/phoenix/stl/container/detail/container.hpp>
  15. #include <boost/phoenix/function/adapt_callable.hpp>
  16. #include <boost/type_traits/is_const.hpp>
  17. namespace boost { namespace phoenix
  18. {
  19. ///////////////////////////////////////////////////////////////////////////////
  20. //
  21. // STL container member functions
  22. //
  23. // Lazy functions for STL container member functions
  24. //
  25. // These functions provide a mechanism for the lazy evaluation of the
  26. // public member functions of the STL containers. For an overview of
  27. // what is meant by 'lazy evaluation', see the comments in operators.hpp
  28. // and functions.hpp.
  29. //
  30. // Lazy functions are provided for all of the member functions of the
  31. // following containers:
  32. //
  33. // deque - list - map - multimap - vector - set - multiset.
  34. //
  35. // Indeed, should *your* class have member functions with the same names
  36. // and signatures as those listed below, then it will automatically be
  37. // supported. To summarize, lazy functions are provided for member
  38. // functions:
  39. //
  40. // assign - at - back - begin - capacity - clear - empty - end -
  41. // erase - front - get_allocator - insert - key_comp - max_size -
  42. // pop_back - pop_front - push_back - push_front - rbegin - rend -
  43. // reserve - resize . size - splice - value_comp.
  44. //
  45. // The lazy functions' names are the same as the corresponding member
  46. // function. Sample usage:
  47. //
  48. // "Normal" version "Lazy" version
  49. // ---------------- --------------
  50. // my_vector.at(5) phoenix::at(arg1, 5)
  51. // my_list.size() phoenix::size(arg1)
  52. // my_vector1.swap(my_vector2) phoenix::swap(arg1, arg2)
  53. //
  54. // Notice that member functions with names that clash with a
  55. // function in stl algorithms are absent. This will be provided
  56. // in Phoenix's algorithm module.
  57. //
  58. // No support is provided here for lazy versions of operator+=,
  59. // operator[] etc. Such operators are not specific to STL containers and
  60. // lazy versions can therefore be found in operators.hpp.
  61. //
  62. ///////////////////////////////////////////////////////////////////////////////
  63. ///////////////////////////////////////////////////////////////////////////////
  64. //
  65. // Lazy member function implementaions.
  66. //
  67. // The structs below provide the guts of the implementation. Thereafter,
  68. // the corresponding lazy function itself is simply:
  69. //
  70. // function<stl::assign> const assign = stl::assign();
  71. //
  72. // The structs provide a nested "result" class template whose
  73. // "type" typedef enables the lazy function to ascertain the type
  74. // to be returned when it is invoked.
  75. //
  76. // They also provide operator() member functions with signatures
  77. // corresponding to those of the underlying member function of
  78. // the STL container.
  79. //
  80. ///////////////////////////////////////////////////////////////////////////////
  81. namespace stl
  82. {
  83. struct assign
  84. {
  85. template <typename Sig>
  86. struct result;
  87. template <
  88. typename This
  89. , typename C
  90. , typename Arg1
  91. >
  92. struct result<This(C&, Arg1&)>
  93. {
  94. typedef typename add_reference<C>::type type;
  95. };
  96. template <
  97. typename This
  98. , typename C
  99. , typename Arg1
  100. , typename Arg2
  101. >
  102. struct result<This(C&, Arg1, Arg2)>
  103. {
  104. typedef typename add_reference<C>::type type;
  105. };
  106. template <
  107. typename This
  108. , typename C
  109. , typename Arg1
  110. , typename Arg2
  111. , typename Arg3
  112. >
  113. struct result<This(C&, Arg1, Arg2, Arg3)>
  114. {
  115. typedef typename add_reference<C>::type type;
  116. };
  117. template <typename C, typename Arg1>
  118. C& operator()(C& c, Arg1 const & arg1) const
  119. {
  120. c.assign(arg1);
  121. return c;
  122. }
  123. template <typename C, typename Arg1, typename Arg2>
  124. C& operator()(C& c, Arg1 arg1, Arg2 arg2) const
  125. {
  126. c.assign(arg1, arg2);
  127. return c;
  128. }
  129. template <typename C, typename Arg1, typename Arg2, typename Arg3>
  130. C& operator()(
  131. C& c
  132. , Arg1 arg1
  133. , Arg2 arg2
  134. , Arg3 const & arg3
  135. ) const
  136. {
  137. return c.assign(arg1, arg2, arg3);
  138. }
  139. };
  140. struct at_impl
  141. {
  142. template <typename Sig>
  143. struct result;
  144. template <typename This, typename C, typename Index>
  145. struct result<This(C&, Index)>
  146. {
  147. //typedef typename const_qualified_reference_of<C>::type type;
  148. typedef typename C::value_type & type;
  149. };
  150. template <typename C, typename Index>
  151. typename result<at_impl(C&, Index const&)>::type
  152. operator()(C& c, Index const &i) const
  153. {
  154. return c.at(i);
  155. }
  156. template <typename This, typename C, typename Index>
  157. struct result<This(C const&, Index)>
  158. {
  159. typedef typename C::value_type const & type;
  160. };
  161. template <typename C, typename Index>
  162. typename result<at_impl(C const&, Index const&)>::type
  163. operator()(C const& c, Index const &i) const
  164. {
  165. return c.at(i);
  166. }
  167. };
  168. struct back
  169. {
  170. template <typename Sig>
  171. struct result;
  172. template <typename This, typename C>
  173. struct result<This(C&)>
  174. {
  175. typedef
  176. typename const_qualified_reference_of<C>::type
  177. type;
  178. };
  179. template <typename C>
  180. typename result<back(C&)>::type
  181. operator()(C& c) const
  182. {
  183. return c.back();
  184. }
  185. };
  186. struct begin
  187. {
  188. template <typename Sig>
  189. struct result;
  190. template <typename This, typename C>
  191. struct result<This(C&)>
  192. {
  193. typedef typename const_qualified_iterator_of<C>::type type;
  194. };
  195. template <typename C>
  196. typename result<begin(C&)>::type
  197. operator()(C& c) const
  198. {
  199. return c.begin();
  200. }
  201. };
  202. struct capacity
  203. {
  204. template <typename Sig>
  205. struct result;
  206. template <typename This, typename C>
  207. struct result<This(C&)>
  208. {
  209. typedef typename size_type_of<C>::type type;
  210. };
  211. template <typename C>
  212. typename result<capacity(C&)>::type
  213. operator()(C const& c) const
  214. {
  215. return c.capacity();
  216. }
  217. };
  218. struct clear
  219. {
  220. typedef void result_type;
  221. template <typename C>
  222. void operator()(C& c) const
  223. {
  224. return c.clear();
  225. }
  226. };
  227. struct empty
  228. {
  229. typedef bool result_type;
  230. template <typename C>
  231. bool operator()(C const& c) const
  232. {
  233. return c.empty();
  234. }
  235. };
  236. struct end
  237. {
  238. template <typename Sig>
  239. struct result;
  240. template <typename This, typename C>
  241. struct result<This(C&)>
  242. {
  243. typedef typename const_qualified_iterator_of<C>::type type;
  244. };
  245. template <typename C>
  246. typename result<end(C&)>::type
  247. operator()(C& c) const
  248. {
  249. return c.end();
  250. }
  251. };
  252. namespace result_of
  253. {
  254. template <typename C, typename Arg1, typename Arg2 = mpl::void_>
  255. struct erase
  256. {
  257. // MSVC and libc++ always returns iterator even in C++03 mode.
  258. typedef
  259. boost::mpl::eval_if<
  260. is_key_type_of<C, Arg1>
  261. , size_type_of<C>
  262. #if defined(BOOST_MSVC) /*&& (BOOST_MSVC <= 1500)*/ \
  263. && (defined(BOOST_LIBSTDCXX11) && 40500 <= BOOST_LIBSTDCXX_VERSION) \
  264. && defined(_LIBCPP_VERSION)
  265. , iterator_of<C>
  266. #else
  267. , boost::mpl::identity<void>
  268. #endif
  269. >
  270. assoc_erase_result;
  271. typedef typename
  272. boost::mpl::eval_if_c<
  273. has_key_type<C>::value
  274. , assoc_erase_result
  275. , iterator_of<C>
  276. >::type
  277. type;
  278. };
  279. }
  280. struct erase
  281. {
  282. // This mouthful can differentiate between the generic erase
  283. // functions (Container == std::deque, std::list, std::vector) and
  284. // that specific to Associative Containers.
  285. //
  286. // where C is a std::deque, std::list, std::vector:
  287. //
  288. // 1) iterator C::erase(iterator where);
  289. // 2) iterator C::erase(iterator first, iterator last);
  290. //
  291. // where C is a std::map, std::multimap, std::set, or std::multiset:
  292. //
  293. // 3) size_type M::erase(const Key& keyval);
  294. // 4-a) void M::erase(iterator where);
  295. // 4-b) iterator M::erase(iterator where);
  296. // 5-a) void M::erase(iterator first, iterator last);
  297. // 5-b) iterator M::erase(iterator first, iterator last);
  298. template <typename Sig>
  299. struct result;
  300. template <typename This, typename C, typename Arg1>
  301. struct result<This(C&, Arg1)>
  302. : result_of::erase<C, Arg1>
  303. {};
  304. template <typename This, typename C, typename Arg1, typename Arg2>
  305. struct result<This(C&, Arg1, Arg2)>
  306. : result_of::erase<C, Arg1, Arg2>
  307. {};
  308. template <typename C, typename Arg1>
  309. typename result_of::erase<C, Arg1>::type
  310. operator()(C& c, Arg1 arg1) const
  311. {
  312. typedef typename result_of::erase<C, Arg1>::type result_type;
  313. return static_cast<result_type>(c.erase(arg1));
  314. }
  315. template <typename C, typename Arg1, typename Arg2>
  316. typename result_of::erase<C, Arg1, Arg2>::type
  317. operator()(C& c, Arg1 arg1, Arg2 arg2) const
  318. {
  319. typedef typename result_of::erase<C, Arg1, Arg2>::type result_type;
  320. return static_cast<result_type>(c.erase(arg1, arg2));
  321. }
  322. };
  323. struct front
  324. {
  325. template <typename Sig>
  326. struct result;
  327. template <typename This, typename C>
  328. struct result<This(C&)>
  329. {
  330. typedef typename const_qualified_reference_of<C>::type type;
  331. };
  332. template <typename C>
  333. typename result<front(C&)>::type
  334. operator()(C& c) const
  335. {
  336. return c.front();
  337. }
  338. };
  339. struct get_allocator
  340. {
  341. template <typename Sig>
  342. struct result;
  343. template <typename This, typename C>
  344. struct result<This(C&)>
  345. {
  346. typedef typename allocator_type_of<C>::type type;
  347. };
  348. template <typename C>
  349. typename result<get_allocator(C const&)>::type
  350. operator()(C& c) const
  351. {
  352. return c.get_allocator();
  353. }
  354. };
  355. namespace result_of
  356. {
  357. template <
  358. typename C
  359. , typename Arg1
  360. , typename Arg2 = mpl::void_
  361. , typename Arg3 = mpl::void_
  362. >
  363. class insert
  364. {
  365. struct pair_iterator_bool
  366. {
  367. typedef typename std::pair<typename C::iterator, bool> type;
  368. };
  369. typedef
  370. boost::mpl::eval_if<
  371. map_insert_returns_pair<typename remove_const<C>::type>
  372. , pair_iterator_bool
  373. , iterator_of<C>
  374. >
  375. choice_1;
  376. typedef
  377. boost::mpl::eval_if_c<
  378. boost::mpl::and_<
  379. boost::is_same<Arg3, mpl::void_>
  380. , boost::mpl::not_<boost::is_same<Arg1, Arg2> >
  381. >::value
  382. , iterator_of<C>
  383. , boost::mpl::identity<void>
  384. >
  385. choice_2;
  386. public:
  387. typedef typename
  388. boost::mpl::eval_if_c<
  389. boost::is_same<Arg2, mpl::void_>::value
  390. , choice_1
  391. , choice_2
  392. >::type
  393. type;
  394. };
  395. }
  396. struct insert
  397. {
  398. // This mouthful can differentiate between the generic insert
  399. // functions (Container == deque, list, vector) and those
  400. // specific to the two map-types, std::map and std::multimap.
  401. //
  402. // where C is a std::deque, std::list, std::vector:
  403. //
  404. // 1) iterator C::insert(iterator where, value_type value);
  405. // 2) void C::insert(
  406. // iterator where, size_type count, value_type value);
  407. // 3) template <typename Iter>
  408. // void C::insert(iterator where, Iter first, Iter last);
  409. //
  410. // where M is a std::map and MM is a std::multimap:
  411. //
  412. // 4) pair<iterator, bool> M::insert(value_type const&);
  413. // 5) iterator MM::insert(value_type const&);
  414. //
  415. // where M is a std::map or std::multimap:
  416. //
  417. // 6) template <typename Iter>
  418. // void M::insert(Iter first, Iter last);
  419. template <typename Sig>
  420. struct result;
  421. template <
  422. typename This
  423. , typename C
  424. , typename Arg1
  425. >
  426. struct result<This(C &, Arg1)>
  427. : result_of::insert<C, Arg1>
  428. {};
  429. template <
  430. typename This
  431. , typename C
  432. , typename Arg1
  433. , typename Arg2
  434. >
  435. struct result<This(C &, Arg1, Arg2)>
  436. : result_of::insert<C, Arg1, Arg2>
  437. {};
  438. template <
  439. typename This
  440. , typename C
  441. , typename Arg1
  442. , typename Arg2
  443. , typename Arg3
  444. >
  445. struct result<This(C &, Arg1, Arg2, Arg3)>
  446. : result_of::insert<C, Arg1, Arg2, Arg3>
  447. {};
  448. template <typename C, typename Arg1>
  449. typename result<insert(C&, Arg1)>::type
  450. operator()(C& c, Arg1 arg1) const
  451. {
  452. return c.insert(arg1);
  453. }
  454. template <typename C, typename Arg1, typename Arg2>
  455. typename result<insert(C&, Arg1, Arg2)>::type
  456. operator()(C& c, Arg1 arg1, Arg2 arg2) const
  457. {
  458. typedef typename result<insert(C&, Arg1, Arg2)>::type result_type;
  459. return static_cast<result_type>(c.insert(arg1, arg2));
  460. }
  461. template <typename C, typename Arg1, typename Arg2, typename Arg3>
  462. typename result<insert(C&, Arg1, Arg2, Arg3)>::type
  463. operator()(C& c, Arg1 arg1, Arg2 arg2, Arg3 arg3) const
  464. {
  465. typedef typename result<insert(C&, Arg1, Arg2, Arg3)>::type result_type;
  466. return static_cast<result_type>(c.insert(arg1, arg2, arg3));
  467. }
  468. };
  469. namespace result_of
  470. {
  471. template <typename C>
  472. struct key_comp
  473. {
  474. typedef typename key_compare_of<C>::type type;
  475. };
  476. }
  477. struct key_comp
  478. {
  479. template <typename Sig>
  480. struct result;
  481. template <typename This, typename C>
  482. struct result<This(C&)>
  483. : result_of::key_comp<C>
  484. {};
  485. template <typename C>
  486. typename result_of::key_comp<C>::type
  487. operator()(C& c) const
  488. {
  489. return c.key_comp();
  490. }
  491. };
  492. struct max_size
  493. {
  494. template <typename Sig>
  495. struct result;
  496. template <typename This, typename C>
  497. struct result<This(C&)>
  498. {
  499. typedef typename size_type_of<C>::type type;
  500. };
  501. template <typename C>
  502. typename result<max_size(C const&)>::type
  503. operator()(C& c) const
  504. {
  505. return c.max_size();
  506. }
  507. };
  508. struct pop_back
  509. {
  510. typedef void result_type;
  511. template <typename C>
  512. void operator()(C& c) const
  513. {
  514. return c.pop_back();
  515. }
  516. };
  517. struct pop_front
  518. {
  519. typedef void result_type;
  520. template <typename C>
  521. void operator()(C& c) const
  522. {
  523. return c.pop_front();
  524. }
  525. };
  526. struct push_back
  527. {
  528. typedef void result_type;
  529. template <typename C, typename Arg>
  530. void operator()(C& c, Arg const& data) const
  531. {
  532. return c.push_back(data);
  533. }
  534. };
  535. struct push_front
  536. {
  537. typedef void result_type;
  538. template <typename C, typename Arg>
  539. void operator()(C& c, Arg const& data) const
  540. {
  541. return c.push_front(data);
  542. }
  543. };
  544. struct rbegin
  545. {
  546. template <typename Sig>
  547. struct result;
  548. template <typename This, typename C>
  549. struct result<This(C&)>
  550. {
  551. typedef typename
  552. const_qualified_reverse_iterator_of<C>::type
  553. type;
  554. };
  555. template <typename C>
  556. typename result<rbegin(C&)>::type
  557. operator()(C& c) const
  558. {
  559. return c.rbegin();
  560. }
  561. };
  562. struct rend
  563. {
  564. template <typename Sig>
  565. struct result;
  566. template <typename This, typename C>
  567. struct result<This(C&)>
  568. {
  569. typedef typename
  570. const_qualified_reverse_iterator_of<C>::type
  571. type;
  572. };
  573. template <typename C>
  574. typename result<rend(C&)>::type
  575. operator()(C& c) const
  576. {
  577. return c.rend();
  578. }
  579. };
  580. struct reserve
  581. {
  582. typedef void result_type;
  583. template <typename C, typename Arg>
  584. void operator()(C& c, Arg const& count) const
  585. {
  586. c.reserve(count);
  587. }
  588. };
  589. struct resize
  590. {
  591. typedef void result_type;
  592. template <typename C, typename Arg1>
  593. void operator()(C& c, Arg1 const& arg1) const
  594. {
  595. c.resize(arg1);
  596. }
  597. template <typename C, typename Arg1, typename Arg2>
  598. void operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const
  599. {
  600. c.resize(arg1, arg2);
  601. }
  602. };
  603. struct size
  604. {
  605. template <typename Sig>
  606. struct result;
  607. template <typename This, typename C>
  608. struct result<This(C&)>
  609. {
  610. typedef typename size_type_of<C>::type type;
  611. };
  612. template <typename C>
  613. typename result<size(C&)>::type
  614. operator()(C& c) const
  615. {
  616. return c.size();
  617. }
  618. };
  619. struct splice
  620. {
  621. typedef void result_type;
  622. template <typename C, typename Arg1, typename Arg2>
  623. void operator()(C& c, Arg1 arg1, Arg2 &arg2) const
  624. {
  625. c.splice(arg1, arg2);
  626. }
  627. template <
  628. typename C
  629. , typename Arg1
  630. , typename Arg2
  631. , typename Arg3
  632. >
  633. void operator()(
  634. C& c
  635. , Arg1 arg1
  636. , Arg2 & arg2
  637. , Arg3 arg3
  638. ) const
  639. {
  640. c.splice(arg1, arg2, arg3);
  641. }
  642. template <
  643. typename C
  644. , typename Arg1
  645. , typename Arg2
  646. , typename Arg3
  647. , typename Arg4
  648. >
  649. void operator()(
  650. C c
  651. , Arg1 arg1
  652. , Arg2 & arg2
  653. , Arg3 arg3
  654. , Arg4 arg4
  655. ) const
  656. {
  657. c.splice(arg1, arg2, arg3, arg4);
  658. }
  659. };
  660. namespace result_of
  661. {
  662. template <typename C>
  663. struct value_comp
  664. {
  665. typedef typename value_compare_of<C>::type type;
  666. };
  667. }
  668. struct value_comp
  669. {
  670. template <typename Sig>
  671. struct result;
  672. template <typename This, typename C>
  673. struct result<This(C&)>
  674. : result_of::value_comp<C>
  675. {};
  676. template <typename C>
  677. typename result_of::value_comp<C>::type
  678. operator()(C& c) const
  679. {
  680. return c.value_comp();
  681. }
  682. };
  683. } // namespace stl
  684. ///////////////////////////////////////////////////////////////////////////////
  685. //
  686. // The lazy functions themselves.
  687. //
  688. ///////////////////////////////////////////////////////////////////////////////
  689. namespace adl_barrier
  690. {
  691. BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 2)
  692. BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 3)
  693. BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 4)
  694. BOOST_PHOENIX_ADAPT_CALLABLE(at, ::boost::phoenix::stl::at_impl, 2)
  695. BOOST_PHOENIX_ADAPT_CALLABLE(back, stl::back, 1)
  696. BOOST_PHOENIX_ADAPT_CALLABLE(begin, stl::begin, 1)
  697. BOOST_PHOENIX_ADAPT_CALLABLE(capacity, stl::capacity, 1)
  698. BOOST_PHOENIX_ADAPT_CALLABLE(clear, stl::clear, 1)
  699. BOOST_PHOENIX_ADAPT_CALLABLE(empty, stl::empty, 1)
  700. BOOST_PHOENIX_ADAPT_CALLABLE(end, stl::end, 1)
  701. BOOST_PHOENIX_ADAPT_CALLABLE(erase, stl::erase, 2)
  702. BOOST_PHOENIX_ADAPT_CALLABLE(erase, stl::erase, 3)
  703. BOOST_PHOENIX_ADAPT_CALLABLE(front, stl::front, 1)
  704. BOOST_PHOENIX_ADAPT_CALLABLE(get_allocator, stl::get_allocator, 1)
  705. BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 2)
  706. BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 3)
  707. BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 4)
  708. BOOST_PHOENIX_ADAPT_CALLABLE(key_comp, stl::key_comp, 1)
  709. BOOST_PHOENIX_ADAPT_CALLABLE(max_size, stl::max_size, 1)
  710. BOOST_PHOENIX_ADAPT_CALLABLE(pop_back, stl::pop_back, 1)
  711. BOOST_PHOENIX_ADAPT_CALLABLE(pop_front, stl::pop_front, 1)
  712. BOOST_PHOENIX_ADAPT_CALLABLE(push_back, stl::push_back, 2)
  713. BOOST_PHOENIX_ADAPT_CALLABLE(push_front, stl::push_front, 2)
  714. BOOST_PHOENIX_ADAPT_CALLABLE(rbegin, stl::rbegin, 1)
  715. BOOST_PHOENIX_ADAPT_CALLABLE(rend, stl::rend, 1)
  716. BOOST_PHOENIX_ADAPT_CALLABLE(reserve, stl::reserve, 2)
  717. BOOST_PHOENIX_ADAPT_CALLABLE(resize, stl::resize, 2)
  718. BOOST_PHOENIX_ADAPT_CALLABLE(resize, stl::resize, 3)
  719. BOOST_PHOENIX_ADAPT_CALLABLE(size, stl::size, 1)
  720. BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 2)
  721. BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 3)
  722. BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 4)
  723. BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 5)
  724. BOOST_PHOENIX_ADAPT_CALLABLE(value_comp, stl::value_comp, 1)
  725. }
  726. using namespace phoenix::adl_barrier;
  727. }} // namespace boost::phoenix
  728. #endif // BOOST_PHOENIX_STL_CONTAINERS_HPP