symbols.hpp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. // Copyright (c) 2001-2011 Hartmut Kaiser
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #if !defined(BOOST_SPIRIT_KARMA_SYMBOLS_NOV_23_2009_1251PM)
  6. #define BOOST_SPIRIT_KARMA_SYMBOLS_NOV_23_2009_1251PM
  7. #include <boost/spirit/home/support/common_terminals.hpp>
  8. #include <boost/spirit/home/support/info.hpp>
  9. #include <boost/spirit/home/support/unused.hpp>
  10. #include <boost/spirit/home/support/attributes_fwd.hpp>
  11. #include <boost/spirit/home/support/detail/get_encoding.hpp>
  12. #include <boost/spirit/home/karma/detail/attributes.hpp>
  13. #include <boost/spirit/home/karma/detail/extract_from.hpp>
  14. #include <boost/spirit/home/karma/domain.hpp>
  15. #include <boost/spirit/home/karma/meta_compiler.hpp>
  16. #include <boost/spirit/home/karma/reference.hpp>
  17. #include <boost/spirit/home/karma/generate.hpp>
  18. #include <boost/spirit/home/karma/delimit_out.hpp>
  19. #include <boost/spirit/home/karma/detail/get_casetag.hpp>
  20. #include <boost/spirit/home/karma/detail/string_generate.hpp>
  21. #include <boost/config.hpp>
  22. #include <boost/proto/extends.hpp>
  23. #include <boost/proto/traits.hpp>
  24. #include <boost/shared_ptr.hpp>
  25. #include <boost/mpl/if.hpp>
  26. #include <map>
  27. #include <set>
  28. #if defined(BOOST_MSVC)
  29. # pragma warning(push)
  30. # pragma warning(disable: 4355) // 'this' : used in base member initializer list warning
  31. #endif
  32. ///////////////////////////////////////////////////////////////////////////////
  33. namespace boost { namespace spirit { namespace traits
  34. {
  35. template <typename T, typename Attribute, typename Enable>
  36. struct symbols_lookup
  37. {
  38. typedef
  39. mpl::eval_if<fusion::traits::is_sequence<T>
  40. , traits::detail::value_at_c<T, 0>
  41. , detail::add_const_ref<T> > sequence_type;
  42. typedef typename
  43. mpl::eval_if<traits::is_container<T>
  44. , traits::container_value<T>
  45. , sequence_type>::type type;
  46. // fusion sequence
  47. template <typename T_>
  48. static type call(T_ const& t, mpl::false_, mpl::true_)
  49. {
  50. return fusion::at_c<0>(t);
  51. }
  52. // container
  53. template <typename T_, typename IsSequence>
  54. static type call(T_ const& t, mpl::true_, IsSequence)
  55. {
  56. return t[0];
  57. }
  58. // not a container and not a fusion sequence
  59. template <typename T_>
  60. static type call(T_ const& t, mpl::false_, mpl::false_)
  61. {
  62. return t;
  63. }
  64. static type call(T const& t)
  65. {
  66. typedef typename traits::is_container<T>::type is_container;
  67. typedef typename fusion::traits::is_sequence<T>::type is_sequence;
  68. return call(t, is_container(), is_sequence());
  69. }
  70. };
  71. template <typename Attribute>
  72. struct symbols_lookup<Attribute, Attribute>
  73. {
  74. typedef Attribute const& type;
  75. static type call(Attribute const& t)
  76. {
  77. return t;
  78. }
  79. };
  80. template <typename Attribute, typename T, typename Enable>
  81. struct symbols_value
  82. {
  83. typedef
  84. mpl::eval_if<fusion::traits::is_sequence<T>
  85. , traits::detail::value_at_c<T, 1>
  86. , mpl::identity<unused_type> > sequence_type;
  87. typedef typename
  88. mpl::eval_if<traits::is_container<T>
  89. , traits::container_value<T>
  90. , sequence_type>::type type;
  91. // fusion sequence
  92. template <typename T_>
  93. static type call(T_ const& t, mpl::false_, mpl::true_)
  94. {
  95. return fusion::at_c<1>(t);
  96. }
  97. // container
  98. template <typename T_, typename IsSequence>
  99. static type call(T_ const& t, mpl::true_, IsSequence)
  100. {
  101. return t[1];
  102. }
  103. // not a container nor a fusion sequence
  104. template <typename T_>
  105. static type call(T_ const&, mpl::false_, mpl::false_)
  106. {
  107. return unused;
  108. }
  109. static type call(T const& t)
  110. {
  111. typedef typename traits::is_container<T>::type is_container;
  112. typedef typename fusion::traits::is_sequence<T>::type is_sequence;
  113. return call(t, is_container(), is_sequence());
  114. }
  115. };
  116. template <typename Attribute>
  117. struct symbols_value<Attribute, Attribute>
  118. {
  119. typedef unused_type type;
  120. static type call(Attribute const&)
  121. {
  122. return unused;
  123. }
  124. };
  125. }}}
  126. ///////////////////////////////////////////////////////////////////////////////
  127. namespace boost { namespace spirit { namespace karma
  128. {
  129. ///////////////////////////////////////////////////////////////////////////
  130. template <typename T, typename Attribute>
  131. struct symbols_lookup
  132. : mpl::if_<
  133. traits::not_is_unused<T>
  134. , std::map<Attribute, T>
  135. , std::set<Attribute>
  136. >
  137. {};
  138. ///////////////////////////////////////////////////////////////////////////
  139. namespace detail
  140. {
  141. ///////////////////////////////////////////////////////////////////////
  142. template <typename CharEncoding, typename Tag>
  143. struct generate_encoded
  144. {
  145. typedef typename
  146. proto::terminal<tag::char_code<Tag, CharEncoding> >::type
  147. encoding_type;
  148. template <typename OutputIterator, typename Expr, typename Attribute>
  149. static bool call(OutputIterator& sink, Expr const& expr
  150. , Attribute const& attr)
  151. {
  152. encoding_type const encoding = encoding_type();
  153. return karma::generate(sink, encoding[expr], attr);
  154. }
  155. };
  156. template <>
  157. struct generate_encoded<unused_type, unused_type>
  158. {
  159. template <typename OutputIterator, typename Expr, typename Attribute>
  160. static bool call(OutputIterator& sink, Expr const& expr
  161. , Attribute const& attr)
  162. {
  163. return karma::generate(sink, expr, attr);
  164. }
  165. };
  166. }
  167. template <
  168. typename Attribute = char, typename T = unused_type
  169. , typename Lookup = typename symbols_lookup<T, Attribute>::type
  170. , typename CharEncoding = unused_type, typename Tag = unused_type>
  171. struct symbols
  172. : proto::extends<
  173. typename proto::terminal<
  174. reference<symbols<Attribute, T, Lookup, CharEncoding, Tag> >
  175. >::type
  176. , symbols<Attribute, T, Lookup, CharEncoding, Tag> >
  177. , primitive_generator<
  178. symbols<Attribute, T, Lookup, CharEncoding, Tag> >
  179. {
  180. typedef T value_type; // the value associated with each entry
  181. typedef reference<symbols> reference_;
  182. typedef typename proto::terminal<reference_>::type terminal;
  183. typedef proto::extends<terminal, symbols> base_type;
  184. template <typename Context, typename Unused>
  185. struct attribute
  186. {
  187. typedef Attribute type;
  188. };
  189. symbols(std::string const& name = "symbols")
  190. : base_type(terminal::make(reference_(*this)))
  191. , add(*this)
  192. , remove(*this)
  193. , lookup(new Lookup())
  194. , name_(name)
  195. {}
  196. symbols(symbols const& syms)
  197. : base_type(terminal::make(reference_(*this)))
  198. , add(*this)
  199. , remove(*this)
  200. , lookup(syms.lookup)
  201. , name_(syms.name_)
  202. {}
  203. template <typename CharEncoding_, typename Tag_>
  204. symbols(symbols<Attribute, T, Lookup, CharEncoding_, Tag_> const& syms)
  205. : base_type(terminal::make(reference_(*this)))
  206. , add(*this)
  207. , remove(*this)
  208. , lookup(syms.lookup)
  209. , name_(syms.name_)
  210. {}
  211. template <typename Symbols, typename Data>
  212. symbols(Symbols const& syms, Data const& data
  213. , std::string const& name = "symbols")
  214. : base_type(terminal::make(reference_(*this)))
  215. , add(*this)
  216. , remove(*this)
  217. , lookup(new Lookup())
  218. , name_(name)
  219. {
  220. typename range_const_iterator<Symbols>::type si = boost::begin(syms);
  221. typename range_const_iterator<Data>::type di = boost::begin(data);
  222. while (si != boost::end(syms))
  223. add(*si++, *di++);
  224. }
  225. symbols&
  226. operator=(symbols const& rhs)
  227. {
  228. *lookup = *rhs.lookup;
  229. name_ = rhs.name_;
  230. return *this;
  231. }
  232. template <typename CharEncoding_, typename Tag_>
  233. symbols&
  234. operator=(symbols<Attribute, T, Lookup, CharEncoding_, Tag_> const& rhs)
  235. {
  236. *lookup = *rhs.lookup;
  237. name_ = rhs.name_;
  238. return *this;
  239. }
  240. void clear()
  241. {
  242. lookup->clear();
  243. }
  244. struct adder;
  245. struct remover;
  246. template <typename Attr, typename T_>
  247. adder const&
  248. operator=(std::pair<Attr, T_> const& p)
  249. {
  250. lookup->clear();
  251. return add(p.first, p.second);
  252. }
  253. template <typename Attr, typename T_>
  254. friend adder const&
  255. operator+= (symbols& sym, std::pair<Attr, T_> const& p)
  256. {
  257. return sym.add(p.first, p.second);
  258. }
  259. template <typename Attr>
  260. friend remover const&
  261. operator-= (symbols& sym, Attr const& attr)
  262. {
  263. return sym.remove(attr);
  264. }
  265. #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
  266. // non-const version needed to suppress proto's += kicking in
  267. template <typename Attr, typename T_>
  268. friend adder const&
  269. operator+= (symbols& sym, std::pair<Attr, T_>& p)
  270. {
  271. return sym.add(p.first, p.second);
  272. }
  273. // non-const version needed to suppress proto's -= kicking in
  274. template <typename Attr>
  275. friend remover const&
  276. operator-= (symbols& sym, Attr& attr)
  277. {
  278. return sym.remove(attr);
  279. }
  280. #else
  281. // for rvalue references
  282. template <typename Attr, typename T_>
  283. friend adder const&
  284. operator+= (symbols& sym, std::pair<Attr, T_>&& p)
  285. {
  286. return sym.add(p.first, p.second);
  287. }
  288. // for rvalue references
  289. template <typename Attr>
  290. friend remover const&
  291. operator-= (symbols& sym, Attr&& attr)
  292. {
  293. return sym.remove(attr);
  294. }
  295. #endif
  296. template <typename F>
  297. void for_each(F f) const
  298. {
  299. std::for_each(lookup->begin(), lookup->end(), f);
  300. }
  301. template <typename Attr>
  302. value_type* find(Attr const& attr)
  303. {
  304. typename Lookup::iterator it = lookup->find(attr);
  305. return (it != lookup->end()) ? &(*it).second : 0;
  306. }
  307. template <typename Attr>
  308. value_type& at(Attr const& attr)
  309. {
  310. return (*lookup)[attr];
  311. }
  312. ///////////////////////////////////////////////////////////////////////
  313. template <typename OutputIterator, typename Context, typename Delimiter
  314. , typename Attr>
  315. bool generate(OutputIterator& sink, Context&, Delimiter const& d
  316. , Attr const& attr) const
  317. {
  318. typename Lookup::iterator it = lookup->find(
  319. traits::symbols_lookup<Attr, Attribute>::call(attr));
  320. if (it == lookup->end())
  321. return false;
  322. return karma::detail::generate_encoded<CharEncoding, Tag>::call(
  323. sink, (*it).second
  324. , traits::symbols_value<Attribute, Attr>::call(attr)) &&
  325. karma::delimit_out(sink, d);
  326. }
  327. template <typename Context>
  328. info what(Context&) const
  329. {
  330. return info(name_);
  331. }
  332. void name(std::string const &str)
  333. {
  334. name_ = str;
  335. }
  336. std::string const &name() const
  337. {
  338. return name_;
  339. }
  340. ///////////////////////////////////////////////////////////////////////
  341. struct adder
  342. {
  343. template <typename, typename = unused_type>
  344. struct result { typedef adder const& type; };
  345. adder(symbols& sym)
  346. : sym(sym)
  347. {
  348. }
  349. template <typename Attr>
  350. adder const&
  351. operator()(Attr const& attr, T const& val = T()) const
  352. {
  353. sym.lookup->insert(typename Lookup::value_type(attr, val));
  354. return *this;
  355. }
  356. template <typename Attr>
  357. adder const&
  358. operator, (Attr const& attr) const
  359. {
  360. sym.lookup->insert(typename Lookup::value_type(attr, T()));
  361. return *this;
  362. }
  363. symbols& sym;
  364. // silence MSVC warning C4512: assignment operator could not be generated
  365. BOOST_DELETED_FUNCTION(adder& operator= (adder const&))
  366. };
  367. struct remover
  368. {
  369. template <typename>
  370. struct result { typedef remover const& type; };
  371. remover(symbols& sym)
  372. : sym(sym)
  373. {
  374. }
  375. template <typename Attr>
  376. remover const&
  377. operator()(Attr const& attr) const
  378. {
  379. sym.lookup->erase(attr);
  380. return *this;
  381. }
  382. template <typename Attr>
  383. remover const&
  384. operator, (Attr const& attr) const
  385. {
  386. sym.lookup->erase(attr);
  387. return *this;
  388. }
  389. symbols& sym;
  390. // silence MSVC warning C4512: assignment operator could not be generated
  391. BOOST_DELETED_FUNCTION(remover& operator= (remover const&))
  392. };
  393. adder add;
  394. remover remove;
  395. shared_ptr<Lookup> lookup;
  396. std::string name_;
  397. };
  398. ///////////////////////////////////////////////////////////////////////////
  399. // specialization for unused stored type
  400. template <
  401. typename Attribute, typename Lookup
  402. , typename CharEncoding, typename Tag>
  403. struct symbols<Attribute, unused_type, Lookup, CharEncoding, Tag>
  404. : proto::extends<
  405. typename proto::terminal<
  406. spirit::karma::reference<
  407. symbols<Attribute, unused_type, Lookup, CharEncoding, Tag> >
  408. >::type
  409. , symbols<Attribute, unused_type, Lookup, CharEncoding, Tag>
  410. >
  411. , spirit::karma::generator<
  412. symbols<Attribute, unused_type, Lookup, CharEncoding, Tag> >
  413. {
  414. typedef unused_type value_type; // the value associated with each entry
  415. typedef spirit::karma::reference<symbols> reference_;
  416. typedef typename proto::terminal<reference_>::type terminal;
  417. typedef proto::extends<terminal, symbols> base_type;
  418. template <typename Context, typename Unused>
  419. struct attribute
  420. {
  421. typedef Attribute type;
  422. };
  423. symbols(std::string const& name = "symbols")
  424. : base_type(terminal::make(reference_(*this)))
  425. , add(*this)
  426. , remove(*this)
  427. , lookup(new Lookup())
  428. , name_(name)
  429. {}
  430. symbols(symbols const& syms)
  431. : base_type(terminal::make(reference_(*this)))
  432. , add(*this)
  433. , remove(*this)
  434. , lookup(syms.lookup)
  435. , name_(syms.name_)
  436. {}
  437. template <typename CharEncoding_, typename Tag_>
  438. symbols(symbols<Attribute, unused_type, Lookup, CharEncoding_, Tag_> const& syms)
  439. : base_type(terminal::make(reference_(*this)))
  440. , add(*this)
  441. , remove(*this)
  442. , lookup(syms.lookup)
  443. , name_(syms.name_)
  444. {}
  445. template <typename Symbols, typename Data>
  446. symbols(Symbols const& syms, Data const& data
  447. , std::string const& name = "symbols")
  448. : base_type(terminal::make(reference_(*this)))
  449. , add(*this)
  450. , remove(*this)
  451. , lookup(new Lookup())
  452. , name_(name)
  453. {
  454. typename range_const_iterator<Symbols>::type si = boost::begin(syms);
  455. typename range_const_iterator<Data>::type di = boost::begin(data);
  456. while (si != boost::end(syms))
  457. add(*si++, *di++);
  458. }
  459. symbols&
  460. operator=(symbols const& rhs)
  461. {
  462. *lookup = *rhs.lookup;
  463. name_ = rhs.name_;
  464. return *this;
  465. }
  466. template <typename CharEncoding_, typename Tag_>
  467. symbols&
  468. operator=(symbols<Attribute, unused_type, Lookup, CharEncoding_, Tag_> const& rhs)
  469. {
  470. *lookup = *rhs.lookup;
  471. name_ = rhs.name_;
  472. return *this;
  473. }
  474. void clear()
  475. {
  476. lookup->clear();
  477. }
  478. struct adder;
  479. struct remover;
  480. template <typename Attr>
  481. adder const&
  482. operator=(Attr const& attr)
  483. {
  484. lookup->clear();
  485. return add(attr);
  486. }
  487. template <typename Attr>
  488. friend adder const&
  489. operator+= (symbols& sym, Attr const& attr)
  490. {
  491. return sym.add(attr);
  492. }
  493. template <typename Attr>
  494. friend remover const&
  495. operator-= (symbols& sym, Attr const& attr)
  496. {
  497. return sym.remove(attr);
  498. }
  499. // non-const version needed to suppress proto's += kicking in
  500. template <typename Attr>
  501. friend adder const&
  502. operator+= (symbols& sym, Attr& attr)
  503. {
  504. return sym.add(attr);
  505. }
  506. // non-const version needed to suppress proto's -= kicking in
  507. template <typename Attr>
  508. friend remover const&
  509. operator-= (symbols& sym, Attr& attr)
  510. {
  511. return sym.remove(attr);
  512. }
  513. template <typename F>
  514. void for_each(F f) const
  515. {
  516. std::for_each(lookup->begin(), lookup->end(), f);
  517. }
  518. template <typename Attr>
  519. value_type const* find(Attr const& attr)
  520. {
  521. typename Lookup::iterator it = lookup->find(attr);
  522. return (it != lookup->end()) ? &unused : 0;
  523. }
  524. template <typename Attr>
  525. value_type at(Attr const& attr)
  526. {
  527. typename Lookup::iterator it = lookup->find(attr);
  528. if (it == lookup->end())
  529. add(attr);
  530. return unused;
  531. }
  532. ///////////////////////////////////////////////////////////////////////
  533. template <typename OutputIterator, typename Context, typename Delimiter
  534. , typename Attr>
  535. bool generate(OutputIterator& sink, Context&, Delimiter const& d
  536. , Attr const& attr) const
  537. {
  538. typename Lookup::iterator it = lookup->find(
  539. traits::symbols_lookup<Attr, Attribute>::call(attr));
  540. if (it == lookup->end())
  541. return false;
  542. return karma::detail::generate_encoded<CharEncoding, Tag>::
  543. call(sink
  544. , traits::symbols_lookup<Attr, Attribute>::call(attr)
  545. , unused) &&
  546. karma::delimit_out(sink, d);
  547. }
  548. template <typename Context>
  549. info what(Context&) const
  550. {
  551. return info(name_);
  552. }
  553. void name(std::string const &str)
  554. {
  555. name_ = str;
  556. }
  557. std::string const &name() const
  558. {
  559. return name_;
  560. }
  561. ///////////////////////////////////////////////////////////////////////
  562. struct adder
  563. {
  564. template <typename, typename = unused_type>
  565. struct result { typedef adder const& type; };
  566. adder(symbols& sym)
  567. : sym(sym)
  568. {
  569. }
  570. template <typename Attr>
  571. adder const&
  572. operator()(Attr const& attr) const
  573. {
  574. sym.lookup->insert(attr);
  575. return *this;
  576. }
  577. template <typename Attr>
  578. adder const&
  579. operator, (Attr const& attr) const
  580. {
  581. sym.lookup->insert(attr);
  582. return *this;
  583. }
  584. symbols& sym;
  585. // silence MSVC warning C4512: assignment operator could not be generated
  586. BOOST_DELETED_FUNCTION(adder& operator= (adder const&))
  587. };
  588. struct remover
  589. {
  590. template <typename>
  591. struct result { typedef remover const& type; };
  592. remover(symbols& sym)
  593. : sym(sym)
  594. {
  595. }
  596. template <typename Attr>
  597. remover const&
  598. operator()(Attr const& attr) const
  599. {
  600. sym.lookup->erase(attr);
  601. return *this;
  602. }
  603. template <typename Attr>
  604. remover const&
  605. operator, (Attr const& attr) const
  606. {
  607. sym.lookup->erase(attr);
  608. return *this;
  609. }
  610. symbols& sym;
  611. // silence MSVC warning C4512: assignment operator could not be generated
  612. BOOST_DELETED_FUNCTION(remover& operator= (remover const&))
  613. };
  614. adder add;
  615. remover remove;
  616. shared_ptr<Lookup> lookup;
  617. std::string name_;
  618. };
  619. ///////////////////////////////////////////////////////////////////////////
  620. // Generator generators: make_xxx function (objects)
  621. ///////////////////////////////////////////////////////////////////////////
  622. template <typename Attribute, typename T, typename Lookup
  623. , typename CharEnconding, typename Tag, typename Modifiers>
  624. struct make_primitive<
  625. reference<symbols<Attribute, T, Lookup, CharEnconding, Tag> >
  626. , Modifiers>
  627. {
  628. static bool const lower =
  629. has_modifier<Modifiers, tag::char_code_base<tag::lower> >::value;
  630. static bool const upper =
  631. has_modifier<Modifiers, tag::char_code_base<tag::upper> >::value;
  632. typedef reference<
  633. symbols<Attribute, T, Lookup, CharEnconding, Tag>
  634. > reference_;
  635. typedef typename mpl::if_c<
  636. lower || upper
  637. , symbols<
  638. Attribute, T, Lookup
  639. , typename spirit::detail::get_encoding_with_case<
  640. Modifiers, unused_type, lower || upper>::type
  641. , typename detail::get_casetag<Modifiers, lower || upper>::type>
  642. , reference_>::type
  643. result_type;
  644. result_type operator()(reference_ ref, unused_type) const
  645. {
  646. return result_type(ref.ref.get());
  647. }
  648. };
  649. }}}
  650. namespace boost { namespace spirit { namespace traits
  651. {
  652. ///////////////////////////////////////////////////////////////////////////
  653. template <typename Attribute, typename T, typename Lookup
  654. , typename CharEncoding, typename Tag
  655. , typename Attr, typename Context, typename Iterator>
  656. struct handles_container<karma::symbols<Attribute, T, Lookup, CharEncoding, Tag>
  657. , Attr, Context, Iterator>
  658. : traits::is_container<Attr> {};
  659. }}}
  660. #if defined(BOOST_MSVC)
  661. # pragma warning(pop)
  662. #endif
  663. #endif