container.hpp 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  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.
  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 const &)>
  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. // BOOST_MSVC #if branch here in map_erase_result non-
  258. // standard behavior. The return type should be void but
  259. // VC7.1 prefers to return iterator_of<C>. As a result,
  260. // VC7.1 complains of error C2562:
  261. // boost::phoenix::stl::erase::operator() 'void' function
  262. // returning a value. Oh well... :*
  263. typedef
  264. boost::mpl::eval_if_c<
  265. boost::is_same<
  266. typename remove_reference<Arg1>::type
  267. , typename iterator_of<C>::type
  268. >::value
  269. #if defined(BOOST_MSVC)// && (BOOST_MSVC <= 1500)
  270. , iterator_of<C>
  271. #else
  272. , boost::mpl::identity<void>
  273. #endif
  274. , size_type_of<C>
  275. >
  276. map_erase_result;
  277. typedef typename
  278. boost::mpl::eval_if_c<
  279. has_mapped_type<C>::value
  280. , map_erase_result
  281. , iterator_of<C>
  282. >::type
  283. type;
  284. };
  285. }
  286. struct erase
  287. {
  288. // This mouthful can differentiate between the generic erase
  289. // functions (Container == std::deque, std::list, std::vector) and
  290. // that specific to the two map-types, std::map and std::multimap.
  291. //
  292. // where C is a std::deque, std::list, std::vector:
  293. //
  294. // 1) iterator C::erase(iterator where);
  295. // 2) iterator C::erase(iterator first, iterator last);
  296. //
  297. // where M is a std::map or std::multimap:
  298. //
  299. // 3) size_type M::erase(const Key& keyval);
  300. // 4) void M::erase(iterator where);
  301. // 5) void M::erase(iterator first, iterator last);
  302. template <typename Sig>
  303. struct result;
  304. template <typename This, typename C, typename Arg1>
  305. struct result<This(C&, Arg1)>
  306. : result_of::erase<C, Arg1>
  307. {};
  308. template <typename This, typename C, typename Arg1, typename Arg2>
  309. struct result<This(C&, Arg1, Arg2)>
  310. : result_of::erase<C, Arg1, Arg2>
  311. {};
  312. template <typename C, typename Arg1>
  313. typename stl_impl::disable_if_is_void<
  314. typename result_of::erase<C, Arg1>::type
  315. >::type
  316. operator()(C& c, Arg1 arg1) const
  317. {
  318. return c.erase(arg1);
  319. }
  320. template <typename C, typename Arg1>
  321. typename stl_impl::enable_if_is_void<
  322. typename result_of::erase<C, Arg1>::type
  323. >::type
  324. operator()(C& c, Arg1 arg1) const
  325. {
  326. c.erase(arg1);
  327. }
  328. template <typename C, typename Arg1, typename Arg2>
  329. typename stl_impl::disable_if_is_void<
  330. typename result_of::erase<C, Arg1, Arg2>::type
  331. >::type
  332. operator()(C& c, Arg1 arg1, Arg2 arg2) const
  333. {
  334. return c.erase(arg1, arg2);
  335. }
  336. template <typename C, typename Arg1, typename Arg2>
  337. typename stl_impl::enable_if_is_void<
  338. typename result_of::erase<C, Arg1, Arg2>::type
  339. >::type
  340. operator()(C& c, Arg1 arg1, Arg2 arg2) const
  341. {
  342. c.erase(arg1, arg2);
  343. }
  344. };
  345. struct front
  346. {
  347. template <typename Sig>
  348. struct result;
  349. template <typename This, typename C>
  350. struct result<This(C&)>
  351. {
  352. typedef typename const_qualified_reference_of<C>::type type;
  353. };
  354. template <typename C>
  355. typename result<front(C&)>::type
  356. operator()(C& c) const
  357. {
  358. return c.front();
  359. }
  360. };
  361. struct get_allocator
  362. {
  363. template <typename Sig>
  364. struct result;
  365. template <typename This, typename C>
  366. struct result<This(C&)>
  367. {
  368. typedef typename allocator_type_of<C>::type type;
  369. };
  370. template <typename C>
  371. typename result<get_allocator(C const&)>::type
  372. operator()(C& c) const
  373. {
  374. return c.get_allocator();
  375. }
  376. };
  377. namespace result_of
  378. {
  379. template <
  380. typename C
  381. , typename Arg1
  382. , typename Arg2 = mpl::void_
  383. , typename Arg3 = mpl::void_
  384. >
  385. class insert
  386. {
  387. struct pair_iterator_bool
  388. {
  389. typedef typename std::pair<typename C::iterator, bool> type;
  390. };
  391. typedef
  392. boost::mpl::eval_if<
  393. map_insert_returns_pair<typename remove_const<C>::type>
  394. , pair_iterator_bool
  395. , iterator_of<C>
  396. >
  397. choice_1;
  398. typedef
  399. boost::mpl::eval_if_c<
  400. boost::mpl::and_<
  401. boost::is_same<Arg3, mpl::void_>
  402. , boost::mpl::not_<boost::is_same<Arg1, Arg2> >
  403. >::value
  404. , iterator_of<C>
  405. , boost::mpl::identity<void>
  406. >
  407. choice_2;
  408. public:
  409. typedef typename
  410. boost::mpl::eval_if_c<
  411. boost::is_same<Arg2, mpl::void_>::value
  412. , choice_1
  413. , choice_2
  414. >::type
  415. type;
  416. };
  417. }
  418. struct insert
  419. {
  420. // This mouthful can differentiate between the generic insert
  421. // functions (Container == deque, list, vector) and those
  422. // specific to the two map-types, std::map and std::multimap.
  423. //
  424. // where C is a std::deque, std::list, std::vector:
  425. //
  426. // 1) iterator C::insert(iterator where, value_type value);
  427. // 2) void C::insert(
  428. // iterator where, size_type count, value_type value);
  429. // 3) template <typename Iter>
  430. // void C::insert(iterator where, Iter first, Iter last);
  431. //
  432. // where M is a std::map and MM is a std::multimap:
  433. //
  434. // 4) pair<iterator, bool> M::insert(value_type const&);
  435. // 5) iterator MM::insert(value_type const&);
  436. //
  437. // where M is a std::map or std::multimap:
  438. //
  439. // 6) template <typename Iter>
  440. // void M::insert(Iter first, Iter last);
  441. template <typename Sig>
  442. struct result;
  443. template <
  444. typename This
  445. , typename C
  446. , typename Arg1
  447. >
  448. struct result<This(C &, Arg1)>
  449. : result_of::insert<C, Arg1>
  450. {};
  451. template <
  452. typename This
  453. , typename C
  454. , typename Arg1
  455. , typename Arg2
  456. >
  457. struct result<This(C &, Arg1, Arg2)>
  458. : result_of::insert<C, Arg1, Arg2>
  459. {};
  460. template <
  461. typename This
  462. , typename C
  463. , typename Arg1
  464. , typename Arg2
  465. , typename Arg3
  466. >
  467. struct result<This(C &, Arg1, Arg2, Arg3)>
  468. : result_of::insert<C, Arg1, Arg2, Arg3>
  469. {};
  470. template <typename C, typename Arg1>
  471. typename result<insert(C&, Arg1)>::type
  472. operator()(C& c, Arg1 arg1) const
  473. {
  474. return c.insert(arg1);
  475. }
  476. template <typename C, typename Arg1, typename Arg2>
  477. typename stl_impl::disable_if_is_void<
  478. typename result<insert(C&, Arg1, Arg2)>::type
  479. >::type
  480. operator()(C& c, Arg1 arg1, Arg2 arg2) const
  481. {
  482. return c.insert(arg1, arg2);
  483. }
  484. template <typename C, typename Arg1, typename Arg2>
  485. typename stl_impl::enable_if_is_void<
  486. typename result<insert(C&, Arg1, Arg2)>::type
  487. >::type
  488. operator()(C& c, Arg1 arg1, Arg2 arg2) const
  489. {
  490. c.insert(arg1, arg2);
  491. }
  492. template <typename C, typename Arg1, typename Arg2, typename Arg3>
  493. typename stl_impl::disable_if_is_void<
  494. typename result<insert(C&, Arg1, Arg2, Arg3)>::type
  495. >::type
  496. operator()(
  497. C& c, Arg1 arg1, Arg2 arg2, Arg3 arg3) const
  498. {
  499. return c.insert(arg1, arg2, arg3);
  500. }
  501. template <typename C, typename Arg1, typename Arg2, typename Arg3>
  502. typename stl_impl::enable_if_is_void<
  503. typename result<insert(C&, Arg1, Arg2, Arg3)>::type
  504. >::type
  505. operator()(
  506. C& c, Arg1 arg1, Arg2 arg2, Arg3 arg3) const
  507. {
  508. c.insert(arg1, arg2, arg3);
  509. }
  510. };
  511. namespace result_of
  512. {
  513. template <typename C>
  514. struct key_comp
  515. {
  516. typedef typename key_compare_of<C>::type type;
  517. };
  518. }
  519. struct key_comp
  520. {
  521. template <typename Sig>
  522. struct result;
  523. template <typename This, typename C>
  524. struct result<This(C&)>
  525. : result_of::key_comp<C>
  526. {};
  527. template <typename C>
  528. typename result_of::key_comp<C>::type
  529. operator()(C& c) const
  530. {
  531. return c.key_comp();
  532. }
  533. };
  534. struct max_size
  535. {
  536. template <typename Sig>
  537. struct result;
  538. template <typename This, typename C>
  539. struct result<This(C&)>
  540. {
  541. typedef typename size_type_of<C>::type type;
  542. };
  543. template <typename C>
  544. typename result<max_size(C const&)>::type
  545. operator()(C& c) const
  546. {
  547. return c.max_size();
  548. }
  549. };
  550. struct pop_back
  551. {
  552. typedef void result_type;
  553. template <typename C>
  554. void operator()(C& c) const
  555. {
  556. return c.pop_back();
  557. }
  558. };
  559. struct pop_front
  560. {
  561. typedef void result_type;
  562. template <typename C>
  563. void operator()(C& c) const
  564. {
  565. return c.pop_front();
  566. }
  567. };
  568. struct push_back
  569. {
  570. typedef void result_type;
  571. template <typename C, typename Arg>
  572. void operator()(C& c, Arg const& data) const
  573. {
  574. return c.push_back(data);
  575. }
  576. };
  577. struct push_front
  578. {
  579. typedef void result_type;
  580. template <typename C, typename Arg>
  581. void operator()(C& c, Arg const& data) const
  582. {
  583. return c.push_front(data);
  584. }
  585. };
  586. struct rbegin
  587. {
  588. template <typename Sig>
  589. struct result;
  590. template <typename This, typename C>
  591. struct result<This(C&)>
  592. {
  593. typedef typename
  594. const_qualified_reverse_iterator_of<C>::type
  595. type;
  596. };
  597. template <typename C>
  598. typename result<rbegin(C&)>::type
  599. operator()(C& c) const
  600. {
  601. return c.rbegin();
  602. }
  603. };
  604. struct rend
  605. {
  606. template <typename Sig>
  607. struct result;
  608. template <typename This, typename C>
  609. struct result<This(C&)>
  610. {
  611. typedef typename
  612. const_qualified_reverse_iterator_of<C>::type
  613. type;
  614. };
  615. template <typename C>
  616. typename result<rend(C&)>::type
  617. operator()(C& c) const
  618. {
  619. return c.rend();
  620. }
  621. };
  622. struct reserve
  623. {
  624. typedef void result_type;
  625. template <typename C, typename Arg>
  626. void operator()(C& c, Arg const& count) const
  627. {
  628. c.reserve(count);
  629. }
  630. };
  631. struct resize
  632. {
  633. typedef void result_type;
  634. template <typename C, typename Arg1>
  635. void operator()(C& c, Arg1 const& arg1) const
  636. {
  637. c.resize(arg1);
  638. }
  639. template <typename C, typename Arg1, typename Arg2>
  640. void operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const
  641. {
  642. c.resize(arg1, arg2);
  643. }
  644. };
  645. struct size
  646. {
  647. template <typename Sig>
  648. struct result;
  649. template <typename This, typename C>
  650. struct result<This(C&)>
  651. {
  652. typedef typename size_type_of<C>::type type;
  653. };
  654. template <typename C>
  655. typename result<size(C&)>::type
  656. operator()(C& c) const
  657. {
  658. return c.size();
  659. }
  660. };
  661. struct splice
  662. {
  663. typedef void result_type;
  664. template <typename C, typename Arg1, typename Arg2>
  665. void operator()(C& c, Arg1 arg1, Arg2 &arg2) const
  666. {
  667. c.splice(arg1, arg2);
  668. }
  669. template <
  670. typename C
  671. , typename Arg1
  672. , typename Arg2
  673. , typename Arg3
  674. >
  675. void operator()(
  676. C& c
  677. , Arg1 arg1
  678. , Arg2 & arg2
  679. , Arg3 arg3
  680. ) const
  681. {
  682. c.splice(arg1, arg2, arg3);
  683. }
  684. template <
  685. typename C
  686. , typename Arg1
  687. , typename Arg2
  688. , typename Arg3
  689. , typename Arg4
  690. >
  691. void operator()(
  692. C c
  693. , Arg1 arg1
  694. , Arg2 & arg2
  695. , Arg3 arg3
  696. , Arg4 arg4
  697. ) const
  698. {
  699. c.splice(arg1, arg2, arg3, arg4);
  700. }
  701. };
  702. namespace result_of
  703. {
  704. template <typename C>
  705. struct value_comp
  706. {
  707. typedef typename value_compare_of<C>::type type;
  708. };
  709. }
  710. struct value_comp
  711. {
  712. template <typename Sig>
  713. struct result;
  714. template <typename This, typename C>
  715. struct result<This(C&)>
  716. : result_of::value_comp<C>
  717. {};
  718. template <typename C>
  719. typename result_of::value_comp<C>::type
  720. operator()(C& c) const
  721. {
  722. return c.value_comp();
  723. }
  724. };
  725. } // namespace stl
  726. ///////////////////////////////////////////////////////////////////////////////
  727. //
  728. // The lazy functions themselves.
  729. //
  730. ///////////////////////////////////////////////////////////////////////////////
  731. namespace adl_barrier
  732. {
  733. BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 2)
  734. BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 3)
  735. BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 4)
  736. BOOST_PHOENIX_ADAPT_CALLABLE(at, ::boost::phoenix::stl::at_impl, 2)
  737. BOOST_PHOENIX_ADAPT_CALLABLE(back, stl::back, 1)
  738. BOOST_PHOENIX_ADAPT_CALLABLE(begin, stl::begin, 1)
  739. BOOST_PHOENIX_ADAPT_CALLABLE(capacity, stl::capacity, 1)
  740. BOOST_PHOENIX_ADAPT_CALLABLE(clear, stl::clear, 1)
  741. BOOST_PHOENIX_ADAPT_CALLABLE(empty, stl::empty, 1)
  742. BOOST_PHOENIX_ADAPT_CALLABLE(end, stl::end, 1)
  743. BOOST_PHOENIX_ADAPT_CALLABLE(erase, stl::erase, 2)
  744. BOOST_PHOENIX_ADAPT_CALLABLE(erase, stl::erase, 3)
  745. BOOST_PHOENIX_ADAPT_CALLABLE(front, stl::front, 1)
  746. BOOST_PHOENIX_ADAPT_CALLABLE(get_allocator, stl::get_allocator, 1)
  747. BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 2)
  748. BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 3)
  749. BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 4)
  750. BOOST_PHOENIX_ADAPT_CALLABLE(key_comp, stl::key_comp, 1)
  751. BOOST_PHOENIX_ADAPT_CALLABLE(max_size, stl::max_size, 1)
  752. BOOST_PHOENIX_ADAPT_CALLABLE(pop_back, stl::pop_back, 1)
  753. BOOST_PHOENIX_ADAPT_CALLABLE(pop_front, stl::pop_front, 1)
  754. BOOST_PHOENIX_ADAPT_CALLABLE(push_back, stl::push_back, 2)
  755. BOOST_PHOENIX_ADAPT_CALLABLE(push_front, stl::push_front, 2)
  756. BOOST_PHOENIX_ADAPT_CALLABLE(rbegin, stl::rbegin, 1)
  757. BOOST_PHOENIX_ADAPT_CALLABLE(rend, stl::rend, 1)
  758. BOOST_PHOENIX_ADAPT_CALLABLE(reserve, stl::reserve, 2)
  759. BOOST_PHOENIX_ADAPT_CALLABLE(resize, stl::resize, 2)
  760. BOOST_PHOENIX_ADAPT_CALLABLE(resize, stl::resize, 3)
  761. BOOST_PHOENIX_ADAPT_CALLABLE(size, stl::size, 1)
  762. BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 2)
  763. BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 3)
  764. BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 4)
  765. BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 5)
  766. BOOST_PHOENIX_ADAPT_CALLABLE(value_comp, stl::value_comp, 1)
  767. }
  768. using namespace phoenix::adl_barrier;
  769. }} // namespace boost::phoenix
  770. #endif // BOOST_PHOENIX_STL_CONTAINERS_HPP