autodoc.xml 230 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100
  1. <?xml version="1.0" standalone="yes"?>
  2. <library-reference><header name="boost/xpressive/basic_regex.hpp">
  3. <para>Contains the definition of the basic_regex&lt;&gt; class template and its associated helper functions. </para><namespace name="boost">
  4. <namespace name="xpressive">
  5. <function name="swap"><type>void</type><template>
  6. <template-type-parameter name="BidiIter"/>
  7. </template><parameter name="left"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The first <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object. </para></description></parameter><parameter name="right"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The second <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object. </para></description></parameter><purpose>Swaps the contents of two <classname alt="boost::xpressive::basic_regex">basic_regex</classname> objects. </purpose><description><para>
  8. <note><para>This is a shallow swap that does not do reference tracking. If you embed a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object by reference in another regular expression and then swap its contents with another <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object, the change will not be visible to the enclosing regular expression. It is done this way to ensure that swap() cannot throw. </para>
  9. </note>
  10. </para></description><throws><simpara>Will not throw.</simpara></throws></function>
  11. </namespace>
  12. </namespace>
  13. </header>
  14. <header name="boost/xpressive/match_results.hpp">
  15. <para>Contains the definition of the match_results type and associated helpers. The match_results type holds the results of a regex_match() or regex_search() operation. </para><namespace name="boost">
  16. <namespace name="xpressive">
  17. </namespace>
  18. </namespace>
  19. </header>
  20. <header name="boost/xpressive/regex_actions.hpp">
  21. <para>Defines the syntax elements of xpressive's action expressions. </para><namespace name="boost">
  22. <namespace name="xpressive">
  23. <struct name="function"><template>
  24. <template-type-parameter name="PolymorphicFunctionObject"/>
  25. </template><purpose>A unary metafunction that turns an ordinary function object type into the type of a deferred function object for use in xpressive semantic actions. </purpose><description><para>Use <computeroutput><classname alt="boost::xpressive::function">xpressive::function</classname>&lt;&gt;</computeroutput> to turn an ordinary polymorphic function object type into a type that can be used to declare an object for use in xpressive semantic actions.</para><para>For example, the global object <computeroutput>xpressive::push_back</computeroutput> can be used to create deferred actions that have the effect of pushing a value into a container. It is defined with <computeroutput><classname alt="boost::xpressive::function">xpressive::function</classname>&lt;&gt;</computeroutput> as follows:<programlisting language="c++">xpressive::function&lt;xpressive::op::push_back&gt;::type const push_back = {};
  26. </programlisting>where <computeroutput><classname alt="boost::xpressive::op::push_back">op::push_back</classname></computeroutput> is an ordinary function object that pushes its second argument into its first. Thus defined, <computeroutput>xpressive::push_back</computeroutput> can be used in semantic actions as follows:<programlisting language="c++">namespace xp = boost::xpressive;
  27. using xp::_;
  28. std::list&lt;int&gt; result;
  29. std::string str("1 23 456 7890");
  30. xp::sregex rx = (+_d)[ xp::push_back(xp::ref(result), xp::as&lt;int&gt;(_) ]
  31. &gt;&gt; *(' ' &gt;&gt; (+_d)[ xp::push_back(xp::ref(result), xp::as&lt;int&gt;(_) ) ]);
  32. </programlisting> </para></description><typedef name="type"><type>proto::terminal&lt; PolymorphicFunctionObject &gt;::type</type></typedef>
  33. </struct><namespace name="op">
  34. <struct name="at"><purpose><computeroutput>at</computeroutput> is a PolymorphicFunctionObject for indexing into a sequence </purpose><struct name="result"><template>
  35. <template-type-parameter name="Sig"/>
  36. </template></struct><struct-specialization name="result"><template>
  37. <template-type-parameter name="This"/>
  38. <template-type-parameter name="Cont"/>
  39. <template-type-parameter name="Idx"/>
  40. </template><specialization><template-arg>This(Cont &amp;</template-arg><template-arg>Idx)</template-arg></specialization><typedef name="type"><type>Cont::reference</type></typedef>
  41. </struct-specialization><struct-specialization name="result"><template>
  42. <template-type-parameter name="This"/>
  43. <template-type-parameter name="Cont"/>
  44. <template-type-parameter name="Idx"/>
  45. </template><specialization><template-arg>This(Cont const &amp;</template-arg><template-arg>Idx)</template-arg></specialization><typedef name="type"><type>Cont::const_reference</type></typedef>
  46. </struct-specialization><struct-specialization name="result"><template>
  47. <template-type-parameter name="This"/>
  48. <template-type-parameter name="Cont"/>
  49. <template-type-parameter name="Idx"/>
  50. </template><specialization><template-arg>This(Cont</template-arg><template-arg>Idx)</template-arg></specialization><typedef name="type"><type>Cont::const_reference</type></typedef>
  51. </struct-specialization><method-group name="public member functions">
  52. <method name="operator()" cv="const"><type>Cont::reference</type><template>
  53. <template-type-parameter name="Cont"/>
  54. <template-type-parameter name="Idx"/>
  55. </template><parameter name="c"><paramtype>Cont &amp;</paramtype><description><para>The RandomAccessSequence to index into </para></description></parameter><parameter name="idx"><paramtype>Idx</paramtype><description><para>The index </para></description></parameter><description><para>
  56. </para></description><requires><para><computeroutput>Cont</computeroutput> is a model of RandomAccessSequence </para>
  57. </requires><returns><para><computeroutput>c[idx]</computeroutput> </para>
  58. </returns></method>
  59. <method name="operator()" cv="const"><type>Cont::const_reference</type><template>
  60. <template-type-parameter name="Cont"/>
  61. <template-type-parameter name="Idx"/>
  62. </template><parameter name="c"><paramtype>Cont const &amp;</paramtype></parameter><parameter name="idx"><paramtype>Idx</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  63. </method-group>
  64. </struct><struct name="back"><purpose><computeroutput>back</computeroutput> is a PolymorphicFunctionObject for fetching the back element of a container. </purpose><struct name="result"><template>
  65. <template-type-parameter name="Sig"/>
  66. </template></struct><struct-specialization name="result"><template>
  67. <template-type-parameter name="This"/>
  68. <template-type-parameter name="Sequence"/>
  69. </template><specialization><template-arg>This(Sequence)</template-arg></specialization><typedef name="sequence_type"><type>remove_reference&lt; Sequence &gt;::type</type></typedef>
  70. <typedef name="type"><type>mpl::if_c&lt; is_const&lt; sequence_type &gt;::<classname>value</classname>, typename sequence_type::const_reference, typename sequence_type::reference &gt;::type</type></typedef>
  71. </struct-specialization><method-group name="public member functions">
  72. <method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>back</classname>(Sequence &amp;)&gt;::type</type><template>
  73. <template-type-parameter name="Sequence"/>
  74. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to fetch the back. </para></description></parameter><description><para>
  75. </para></description><returns><para><computeroutput>seq.back()</computeroutput> </para>
  76. </returns></method>
  77. </method-group>
  78. </struct><struct name="first"><purpose><computeroutput>first</computeroutput> is a PolymorphicFunctionObject for fetching the first element of a pair. </purpose><struct name="result"><template>
  79. <template-type-parameter name="Sig"/>
  80. </template></struct><struct-specialization name="result"><template>
  81. <template-type-parameter name="This"/>
  82. <template-type-parameter name="Pair"/>
  83. </template><specialization><template-arg>This(Pair)</template-arg></specialization><typedef name="type"><type>remove_reference&lt; Pair &gt;::type::first_type</type></typedef>
  84. </struct-specialization><method-group name="public member functions">
  85. <method name="operator()" cv="const"><type>Pair::first_type</type><template>
  86. <template-type-parameter name="Pair"/>
  87. </template><parameter name="p"><paramtype>Pair const &amp;</paramtype><description><para>The pair from which to fetch the first element. </para></description></parameter><description><para>
  88. </para></description><returns><para><computeroutput>p.first</computeroutput> </para>
  89. </returns></method>
  90. </method-group>
  91. </struct><struct name="front"><purpose><computeroutput>front</computeroutput> is a PolymorphicFunctionObject for fetching the front element of a container. </purpose><struct name="result"><template>
  92. <template-type-parameter name="Sig"/>
  93. </template></struct><struct-specialization name="result"><template>
  94. <template-type-parameter name="This"/>
  95. <template-type-parameter name="Sequence"/>
  96. </template><specialization><template-arg>This(Sequence)</template-arg></specialization><typedef name="sequence_type"><type>remove_reference&lt; Sequence &gt;::type</type></typedef>
  97. <typedef name="type"><type>mpl::if_c&lt; is_const&lt; sequence_type &gt;::<classname>value</classname>, typename sequence_type::const_reference, typename sequence_type::reference &gt;::type</type></typedef>
  98. </struct-specialization><method-group name="public member functions">
  99. <method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>front</classname>(Sequence &amp;)&gt;::type</type><template>
  100. <template-type-parameter name="Sequence"/>
  101. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to fetch the front. </para></description></parameter><description><para>
  102. </para></description><returns><para><computeroutput>seq.front()</computeroutput> </para>
  103. </returns></method>
  104. </method-group>
  105. </struct><struct name="insert"><purpose><computeroutput>insert</computeroutput> is a PolymorphicFunctionObject for inserting a value or a sequence of values into a sequence container, an associative container, or a string. </purpose><struct name="result"><template>
  106. <template-type-parameter name="Sig"/>
  107. </template><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef>
  108. </struct><method-group name="public member functions">
  109. <method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>insert</classname>(Cont &amp;, A0 const &amp;)&gt;::type</type><template>
  110. <template-type-parameter name="Cont"/>
  111. <template-type-parameter name="A0"/>
  112. </template><parameter name="cont"><paramtype>Cont &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  113. <method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>insert</classname>(Cont &amp;, A0 const &amp;, A1 const &amp;)&gt;::type</type><template>
  114. <template-type-parameter name="Cont"/>
  115. <template-type-parameter name="A0"/>
  116. <template-type-parameter name="A1"/>
  117. </template><parameter name="cont"><paramtype>Cont &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  118. <method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>insert</classname>(Cont &amp;, A0 const &amp;, A1 const &amp;, A2 const &amp;)&gt;::type</type><template>
  119. <template-type-parameter name="Cont"/>
  120. <template-type-parameter name="A0"/>
  121. <template-type-parameter name="A1"/>
  122. <template-type-parameter name="A2"/>
  123. </template><parameter name="cont"><paramtype>Cont &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  124. <method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>insert</classname>(Cont &amp;, A0 const &amp;, A1 const &amp;, A2 const &amp;, A3 const &amp;)&gt;::type</type><template>
  125. <template-type-parameter name="Cont"/>
  126. <template-type-parameter name="A0"/>
  127. <template-type-parameter name="A1"/>
  128. <template-type-parameter name="A2"/>
  129. <template-type-parameter name="A3"/>
  130. </template><parameter name="cont"><paramtype>Cont &amp;</paramtype><description><para>The container into which to insert the element(s) </para></description></parameter><parameter name="a0"><paramtype>A0 const &amp;</paramtype><description><para>A value, iterator, or count </para></description></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype><description><para>A value, iterator, string, count, or character </para></description></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype><description><para>A value, iterator, or count </para></description></parameter><parameter name="a3"><paramtype>A3 const &amp;</paramtype><description><para>A count </para></description></parameter><description><para>
  131. </para></description><returns><para><itemizedlist>
  132. <listitem><para>For the form <computeroutput>insert()(cont, a0)</computeroutput>, return <computeroutput>cont.insert(a0)</computeroutput>. </para>
  133. </listitem>
  134. <listitem><para>For the form <computeroutput>insert()(cont, a0, a1)</computeroutput>, return <computeroutput>cont.insert(a0, a1)</computeroutput>. </para>
  135. </listitem>
  136. <listitem><para>For the form <computeroutput>insert()(cont, a0, a1, a2)</computeroutput>, return <computeroutput>cont.insert(a0, a1, a2)</computeroutput>. </para>
  137. </listitem>
  138. <listitem><para>For the form <computeroutput>insert()(cont, a0, a1, a2, a3)</computeroutput>, return <computeroutput>cont.insert(a0, a1, a2, a3)</computeroutput>. </para>
  139. </listitem>
  140. </itemizedlist>
  141. </para>
  142. </returns></method>
  143. </method-group>
  144. </struct><struct name="length"><purpose><computeroutput>length</computeroutput> is a PolymorphicFunctionObject for fetching the length of <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput>. </purpose><struct name="result"><template>
  145. <template-type-parameter name="Sig"/>
  146. </template></struct><struct-specialization name="result"><template>
  147. <template-type-parameter name="This"/>
  148. <template-type-parameter name="Sub"/>
  149. </template><specialization><template-arg>This(Sub)</template-arg></specialization><typedef name="type"><type>remove_reference&lt; Sub &gt;::type::difference_type</type></typedef>
  150. </struct-specialization><method-group name="public member functions">
  151. <method name="operator()" cv="const"><type>Sub::difference_type</type><template>
  152. <template-type-parameter name="Sub"/>
  153. </template><parameter name="sub"><paramtype>Sub const &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> object. </para></description></parameter><description><para>
  154. </para></description><returns><para><computeroutput>sub.length()</computeroutput> </para>
  155. </returns></method>
  156. </method-group>
  157. </struct><struct name="make_pair"><purpose><computeroutput><classname alt="boost::xpressive::op::make_pair">make_pair</classname></computeroutput> is a PolymorphicFunctionObject for building a <computeroutput><classname alt="std::pair">std::pair</classname></computeroutput> out of two parameters </purpose><struct name="result"><template>
  158. <template-type-parameter name="Sig"/>
  159. </template></struct><struct-specialization name="result"><template>
  160. <template-type-parameter name="This"/>
  161. <template-type-parameter name="First"/>
  162. <template-type-parameter name="Second"/>
  163. </template><specialization><template-arg>This(First</template-arg><template-arg>Second)</template-arg></specialization><typedef name="first_type"><purpose>For exposition only. </purpose><type>decay&lt; First &gt;::type</type></typedef>
  164. <typedef name="second_type"><purpose>For exposition only. </purpose><type>decay&lt; Second &gt;::type</type></typedef>
  165. <typedef name="type"><type><classname>std::pair</classname>&lt; first_type, second_type &gt;</type></typedef>
  166. </struct-specialization><method-group name="public member functions">
  167. <method name="operator()" cv="const"><type><classname>std::pair</classname>&lt; First, Second &gt;</type><template>
  168. <template-type-parameter name="First"/>
  169. <template-type-parameter name="Second"/>
  170. </template><parameter name="first"><paramtype>First const &amp;</paramtype><description><para>The first element of the pair </para></description></parameter><parameter name="second"><paramtype>Second const &amp;</paramtype><description><para>The second element of the pair </para></description></parameter><description><para>
  171. </para></description><returns><para><computeroutput>std::make_pair(first, second)</computeroutput> </para>
  172. </returns></method>
  173. </method-group>
  174. </struct><struct name="matched"><purpose><computeroutput>matched</computeroutput> is a PolymorphicFunctionObject for assessing whether a <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> object matched or not. </purpose><typedef name="result_type"><type>bool</type></typedef>
  175. <method-group name="public member functions">
  176. <method name="operator()" cv="const"><type>bool</type><template>
  177. <template-type-parameter name="Sub"/>
  178. </template><parameter name="sub"><paramtype>Sub const &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> object. </para></description></parameter><description><para>
  179. </para></description><returns><para><computeroutput>sub.matched</computeroutput> </para>
  180. </returns></method>
  181. </method-group>
  182. </struct><struct name="pop"><purpose><computeroutput>pop</computeroutput> is a PolymorphicFunctionObject for popping an element from a container. </purpose><typedef name="result_type"><type>void</type></typedef>
  183. <method-group name="public member functions">
  184. <method name="operator()" cv="const"><type>void</type><template>
  185. <template-type-parameter name="Sequence"/>
  186. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to pop. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.pop()</computeroutput>. </purpose><description><para>
  187. </para></description><returns><para><computeroutput>void</computeroutput> </para>
  188. </returns></method>
  189. </method-group>
  190. </struct><struct name="pop_back"><purpose><computeroutput><classname alt="boost::xpressive::op::pop_back">pop_back</classname></computeroutput> is a PolymorphicFunctionObject for popping an element from the back of a container. </purpose><typedef name="result_type"><type>void</type></typedef>
  191. <method-group name="public member functions">
  192. <method name="operator()" cv="const"><type>void</type><template>
  193. <template-type-parameter name="Sequence"/>
  194. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to pop. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.pop_back()</computeroutput>. </purpose><description><para>
  195. </para></description><returns><para><computeroutput>void</computeroutput> </para>
  196. </returns></method>
  197. </method-group>
  198. </struct><struct name="pop_front"><purpose><computeroutput><classname alt="boost::xpressive::op::pop_front">pop_front</classname></computeroutput> is a PolymorphicFunctionObject for popping an element from the front of a container. </purpose><typedef name="result_type"><type>void</type></typedef>
  199. <method-group name="public member functions">
  200. <method name="operator()" cv="const"><type>void</type><template>
  201. <template-type-parameter name="Sequence"/>
  202. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to pop. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.pop_front()</computeroutput>. </purpose><description><para>
  203. </para></description><returns><para><computeroutput>void</computeroutput> </para>
  204. </returns></method>
  205. </method-group>
  206. </struct><struct name="push"><purpose><computeroutput>push</computeroutput> is a PolymorphicFunctionObject for pushing an element into a container. </purpose><typedef name="result_type"><type>void</type></typedef>
  207. <method-group name="public member functions">
  208. <method name="operator()" cv="const"><type>void</type><template>
  209. <template-type-parameter name="Sequence"/>
  210. <template-type-parameter name="Value"/>
  211. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence into which the value should be pushed. </para></description></parameter><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to push into the sequence. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.push(val)</computeroutput>. </purpose><description><para>
  212. </para></description><returns><para><computeroutput>void</computeroutput> </para>
  213. </returns></method>
  214. </method-group>
  215. </struct><struct name="push_back"><purpose><computeroutput><classname alt="boost::xpressive::op::push_back">push_back</classname></computeroutput> is a PolymorphicFunctionObject for pushing an element into the back of a container. </purpose><typedef name="result_type"><type>void</type></typedef>
  216. <method-group name="public member functions">
  217. <method name="operator()" cv="const"><type>void</type><template>
  218. <template-type-parameter name="Sequence"/>
  219. <template-type-parameter name="Value"/>
  220. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence into which the value should be pushed. </para></description></parameter><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to push into the sequence. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.push_back(val)</computeroutput>. </purpose><description><para>
  221. </para></description><returns><para><computeroutput>void</computeroutput> </para>
  222. </returns></method>
  223. </method-group>
  224. </struct><struct name="push_front"><purpose><computeroutput><classname alt="boost::xpressive::op::push_front">push_front</classname></computeroutput> is a PolymorphicFunctionObject for pushing an element into the front of a container. </purpose><typedef name="result_type"><type>void</type></typedef>
  225. <method-group name="public member functions">
  226. <method name="operator()" cv="const"><type>void</type><template>
  227. <template-type-parameter name="Sequence"/>
  228. <template-type-parameter name="Value"/>
  229. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence into which the value should be pushed. </para></description></parameter><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to push into the sequence. </para></description></parameter><purpose>Equivalent to <computeroutput>seq.push_front(val)</computeroutput>. </purpose><description><para>
  230. </para></description><returns><para><computeroutput>void</computeroutput> </para>
  231. </returns></method>
  232. </method-group>
  233. </struct><struct name="second"><purpose><computeroutput>second</computeroutput> is a PolymorphicFunctionObject for fetching the second element of a pair. </purpose><struct name="result"><template>
  234. <template-type-parameter name="Sig"/>
  235. </template></struct><struct-specialization name="result"><template>
  236. <template-type-parameter name="This"/>
  237. <template-type-parameter name="Pair"/>
  238. </template><specialization><template-arg>This(Pair)</template-arg></specialization><typedef name="type"><type>remove_reference&lt; Pair &gt;::type::second_type</type></typedef>
  239. </struct-specialization><method-group name="public member functions">
  240. <method name="operator()" cv="const"><type>Pair::second_type</type><template>
  241. <template-type-parameter name="Pair"/>
  242. </template><parameter name="p"><paramtype>Pair const &amp;</paramtype><description><para>The pair from which to fetch the second element. </para></description></parameter><description><para>
  243. </para></description><returns><para><computeroutput>p.second</computeroutput> </para>
  244. </returns></method>
  245. </method-group>
  246. </struct><struct name="str"><purpose><computeroutput>str</computeroutput> is a PolymorphicFunctionObject for turning a <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> into an equivalent <computeroutput>std::string</computeroutput>. </purpose><struct name="result"><template>
  247. <template-type-parameter name="Sig"/>
  248. </template></struct><struct-specialization name="result"><template>
  249. <template-type-parameter name="This"/>
  250. <template-type-parameter name="Sub"/>
  251. </template><specialization><template-arg>This(Sub)</template-arg></specialization><typedef name="type"><type>remove_reference&lt; Sub &gt;::type::string_type</type></typedef>
  252. </struct-specialization><method-group name="public member functions">
  253. <method name="operator()" cv="const"><type>Sub::string_type</type><template>
  254. <template-type-parameter name="Sub"/>
  255. </template><parameter name="sub"><paramtype>Sub const &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> object. </para></description></parameter><description><para>
  256. </para></description><returns><para><computeroutput>sub.str()</computeroutput> </para>
  257. </returns></method>
  258. </method-group>
  259. </struct><struct name="top"><purpose><computeroutput>top</computeroutput> is a PolymorphicFunctionObject for fetching the top element of a stack. </purpose><struct name="result"><template>
  260. <template-type-parameter name="Sig"/>
  261. </template></struct><struct-specialization name="result"><template>
  262. <template-type-parameter name="This"/>
  263. <template-type-parameter name="Sequence"/>
  264. </template><specialization><template-arg>This(Sequence)</template-arg></specialization><typedef name="sequence_type"><type>remove_reference&lt; Sequence &gt;::type</type></typedef>
  265. <typedef name="type"><type>mpl::if_c&lt; is_const&lt; sequence_type &gt;::<classname>value</classname>, typename sequence_type::value_type const &amp;, typename sequence_type::value_type &amp; &gt;::type</type></typedef>
  266. </struct-specialization><method-group name="public member functions">
  267. <method name="operator()" cv="const"><type><classname>result</classname>&lt; <classname>top</classname>(Sequence &amp;)&gt;::type</type><template>
  268. <template-type-parameter name="Sequence"/>
  269. </template><parameter name="seq"><paramtype>Sequence &amp;</paramtype><description><para>The sequence from which to fetch the top. </para></description></parameter><description><para>
  270. </para></description><returns><para><computeroutput>seq.top()</computeroutput> </para>
  271. </returns></method>
  272. </method-group>
  273. </struct><struct name="unwrap_reference"><purpose><computeroutput><classname alt="boost::xpressive::op::unwrap_reference">unwrap_reference</classname></computeroutput> is a PolymorphicFunctionObject for unwrapping a <computeroutput>boost::reference_wrapper&lt;&gt;</computeroutput>. </purpose><struct name="result"><template>
  274. <template-type-parameter name="Sig"/>
  275. </template></struct><struct-specialization name="result"><template>
  276. <template-type-parameter name="This"/>
  277. <template-type-parameter name="Ref"/>
  278. </template><specialization><template-arg>This(Ref &amp;)</template-arg></specialization><typedef name="type"><type>boost::unwrap_reference&lt; Ref &gt;::type &amp;</type></typedef>
  279. </struct-specialization><struct-specialization name="result"><template>
  280. <template-type-parameter name="This"/>
  281. <template-type-parameter name="Ref"/>
  282. </template><specialization><template-arg>This(Ref)</template-arg></specialization><typedef name="type"><type>boost::unwrap_reference&lt; Ref &gt;::type &amp;</type></typedef>
  283. </struct-specialization><method-group name="public member functions">
  284. <method name="operator()" cv="const"><type>T &amp;</type><template>
  285. <template-type-parameter name="T"/>
  286. </template><parameter name="r"><paramtype>boost::reference_wrapper&lt; T &gt;</paramtype><description><para>The <computeroutput>boost::reference_wrapper&lt;T&gt;</computeroutput> to unwrap. </para></description></parameter><description><para>
  287. </para></description><returns><para><computeroutput>static_cast&lt;T &amp;&gt;(r)</computeroutput> </para>
  288. </returns></method>
  289. </method-group>
  290. </struct></namespace>
  291. <data-member name="at"><type><classname>function</classname>&lt; <classname>op::at</classname> &gt;::type const</type><purpose><computeroutput>at</computeroutput> is a lazy PolymorphicFunctionObject for indexing into a sequence in an xpressive semantic action. </purpose></data-member>
  292. <data-member name="push"><type><classname>function</classname>&lt; <classname>op::push</classname> &gt;::type const</type><purpose><computeroutput>push</computeroutput> is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. </purpose></data-member>
  293. <data-member name="push_back"><type><classname>function</classname>&lt; <classname>op::push_back</classname> &gt;::type const</type><purpose><computeroutput>push_back</computeroutput> is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. </purpose></data-member>
  294. <data-member name="push_front"><type><classname>function</classname>&lt; <classname>op::push_front</classname> &gt;::type const</type><purpose><computeroutput>push_front</computeroutput> is a lazy PolymorphicFunctionObject for pushing a value into a container in an xpressive semantic action. </purpose></data-member>
  295. <data-member name="pop"><type><classname>function</classname>&lt; <classname>op::pop</classname> &gt;::type const</type><purpose><computeroutput>pop</computeroutput> is a lazy PolymorphicFunctionObject for popping the top element from a sequence in an xpressive semantic action. </purpose></data-member>
  296. <data-member name="pop_back"><type><classname>function</classname>&lt; <classname>op::pop_back</classname> &gt;::type const</type><purpose><computeroutput>pop_back</computeroutput> is a lazy PolymorphicFunctionObject for popping the back element from a sequence in an xpressive semantic action. </purpose></data-member>
  297. <data-member name="pop_front"><type><classname>function</classname>&lt; <classname>op::pop_front</classname> &gt;::type const</type><purpose><computeroutput>pop_front</computeroutput> is a lazy PolymorphicFunctionObject for popping the front element from a sequence in an xpressive semantic action. </purpose></data-member>
  298. <data-member name="top"><type><classname>function</classname>&lt; <classname>op::top</classname> &gt;::type const</type><purpose><computeroutput>top</computeroutput> is a lazy PolymorphicFunctionObject for accessing the top element from a stack in an xpressive semantic action. </purpose></data-member>
  299. <data-member name="back"><type><classname>function</classname>&lt; <classname>op::back</classname> &gt;::type const</type><purpose><computeroutput>back</computeroutput> is a lazy PolymorphicFunctionObject for fetching the back element of a sequence in an xpressive semantic action. </purpose></data-member>
  300. <data-member name="front"><type><classname>function</classname>&lt; <classname>op::front</classname> &gt;::type const</type><purpose><computeroutput>front</computeroutput> is a lazy PolymorphicFunctionObject for fetching the front element of a sequence in an xpressive semantic action. </purpose></data-member>
  301. <data-member name="first"><type><classname>function</classname>&lt; <classname>op::first</classname> &gt;::type const</type><purpose><computeroutput>first</computeroutput> is a lazy PolymorphicFunctionObject for accessing the first element of a <computeroutput><classname alt="std::pair">std::pair</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
  302. <data-member name="second"><type><classname>function</classname>&lt; <classname>op::second</classname> &gt;::type const</type><purpose><computeroutput>second</computeroutput> is a lazy PolymorphicFunctionObject for accessing the second element of a <computeroutput><classname alt="std::pair">std::pair</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
  303. <data-member name="matched"><type><classname>function</classname>&lt; <classname>op::matched</classname> &gt;::type const</type><purpose><computeroutput>matched</computeroutput> is a lazy PolymorphicFunctionObject for accessing the <computeroutput>matched</computeroutput> member of a <computeroutput><classname alt="boost::xpressive::sub_match">xpressive::sub_match</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
  304. <data-member name="length"><type><classname>function</classname>&lt; <classname>op::length</classname> &gt;::type const</type><purpose><computeroutput>length</computeroutput> is a lazy PolymorphicFunctionObject for computing the length of a <computeroutput><classname alt="boost::xpressive::sub_match">xpressive::sub_match</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
  305. <data-member name="str"><type><classname>function</classname>&lt; <classname>op::str</classname> &gt;::type const</type><purpose><computeroutput>str</computeroutput> is a lazy PolymorphicFunctionObject for converting a <computeroutput><classname alt="boost::xpressive::sub_match">xpressive::sub_match</classname>&lt;&gt;</computeroutput> to a <computeroutput>std::basic_string&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
  306. <data-member name="insert"><type><classname>function</classname>&lt; <classname>op::insert</classname> &gt;::type const</type><purpose><computeroutput>insert</computeroutput> is a lazy PolymorphicFunctionObject for inserting a value or a range of values into a sequence in an xpressive semantic action. </purpose></data-member>
  307. <data-member name="make_pair"><type><classname>function</classname>&lt; <classname>op::make_pair</classname> &gt;::type const</type><purpose><computeroutput>make_pair</computeroutput> is a lazy PolymorphicFunctionObject for making a <computeroutput><classname alt="std::pair">std::pair</classname>&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
  308. <data-member name="unwrap_reference"><type><classname>function</classname>&lt; <classname>op::unwrap_reference</classname> &gt;::type const</type><purpose><computeroutput>unwrap_reference</computeroutput> is a lazy PolymorphicFunctionObject for unwrapping a <computeroutput>boost::reference_wrapper&lt;&gt;</computeroutput> in an xpressive semantic action. </purpose></data-member>
  309. <function name="as"><type><emphasis>unspecified</emphasis></type><template>
  310. <template-type-parameter name="T"><purpose><para>The type to which to lexically cast the parameter. </para></purpose></template-type-parameter>
  311. <template-type-parameter name="A"/>
  312. </template><parameter name="a"><paramtype>A const &amp;</paramtype><description><para>The lazy value to lexically cast. </para></description></parameter><purpose><computeroutput>as()</computeroutput> is a lazy funtion for lexically casting a parameter to a different type. </purpose><description><para>
  313. </para></description><returns><para>A lazy object that, when evaluated, lexically casts its argument to the desired type. </para>
  314. </returns></function>
  315. <function name="static_cast_"><type><emphasis>unspecified</emphasis></type><template>
  316. <template-type-parameter name="T"><purpose><para>The type to which to statically cast the parameter. </para></purpose></template-type-parameter>
  317. <template-type-parameter name="A"/>
  318. </template><parameter name="a"><paramtype>A const &amp;</paramtype><description><para>The lazy value to statically cast. </para></description></parameter><purpose><computeroutput>static_cast_</computeroutput> is a lazy funtion for statically casting a parameter to a different type. </purpose><description><para>
  319. </para></description><returns><para>A lazy object that, when evaluated, statically casts its argument to the desired type. </para>
  320. </returns></function>
  321. <function name="dynamic_cast_"><type><emphasis>unspecified</emphasis></type><template>
  322. <template-type-parameter name="T"><purpose><para>The type to which to dynamically cast the parameter. </para></purpose></template-type-parameter>
  323. <template-type-parameter name="A"/>
  324. </template><parameter name="a"><paramtype>A const &amp;</paramtype><description><para>The lazy value to dynamically cast. </para></description></parameter><purpose><computeroutput>dynamic_cast_</computeroutput> is a lazy funtion for dynamically casting a parameter to a different type. </purpose><description><para>
  325. </para></description><returns><para>A lazy object that, when evaluated, dynamically casts its argument to the desired type. </para>
  326. </returns></function>
  327. <function name="const_cast_"><type><emphasis>unspecified</emphasis></type><template>
  328. <template-type-parameter name="T"><purpose><para>The type to which to const-cast the parameter. </para></purpose></template-type-parameter>
  329. <template-type-parameter name="A"/>
  330. </template><parameter name="a"><paramtype>A const &amp;</paramtype><description><para>The lazy value to const-cast. </para></description></parameter><purpose><computeroutput>dynamic_cast_</computeroutput> is a lazy funtion for const-casting a parameter to a different type. </purpose><description><para>
  331. </para></description><returns><para>A lazy object that, when evaluated, const-casts its argument to the desired type. </para>
  332. </returns></function>
  333. <function name="val"><type><classname>value</classname>&lt; T &gt; const</type><template>
  334. <template-type-parameter name="T"/>
  335. </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter><purpose>Helper for constructing <computeroutput>value&lt;&gt;</computeroutput> objects. </purpose><description><para>
  336. </para></description><returns><para><computeroutput>value&lt;T&gt;(t)</computeroutput> </para>
  337. </returns></function>
  338. <function name="ref"><type><classname>reference</classname>&lt; T &gt; const</type><template>
  339. <template-type-parameter name="T"/>
  340. </template><parameter name="t"><paramtype>T &amp;</paramtype></parameter><purpose>Helper for constructing <computeroutput>reference&lt;&gt;</computeroutput> objects. </purpose><description><para>
  341. </para></description><returns><para><computeroutput>reference&lt;T&gt;(t)</computeroutput> </para>
  342. </returns></function>
  343. <function name="cref"><type><classname>reference</classname>&lt; T const &gt; const</type><template>
  344. <template-type-parameter name="T"/>
  345. </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter><purpose>Helper for constructing <computeroutput>reference&lt;&gt;</computeroutput> objects that store a reference to const. </purpose><description><para>
  346. </para></description><returns><para><computeroutput>reference&lt;T const&gt;(t)</computeroutput> </para>
  347. </returns></function>
  348. <function name="check"><type><emphasis>unspecified</emphasis></type><template>
  349. <template-type-parameter name="T"/>
  350. </template><parameter name="t"><paramtype>T const &amp;</paramtype><description><para>The UnaryPredicate object or Boolean semantic action.</para></description></parameter><purpose>For adding user-defined assertions to your regular expressions. </purpose><description><para>
  351. A <link linkend="boost_xpressive.user_s_guide.semantic_actions_and_user_defined_assertions.user_defined_assertions">user-defined assertion</link> is a kind of semantic action that evaluates a Boolean lambda and, if it evaluates to false, causes the match to fail at that location in the string. This will cause backtracking, so the match may ultimately succeed.</para><para>To use <computeroutput>check()</computeroutput> to specify a user-defined assertion in a regex, use the following syntax:<programlisting language="c++">sregex s = (_d &gt;&gt; _d)[check( XXX )]; // XXX is a custom assertion
  352. </programlisting>The assertion is evaluated with a <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> object that delineates what part of the string matched the sub-expression to which the assertion was attached.</para><para><computeroutput>check()</computeroutput> can be used with an ordinary predicate that takes a <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> object as follows:<programlisting language="c++">// A predicate that is true IFF a sub-match is
  353. // either 3 or 6 characters long.
  354. struct three_or_six
  355. {
  356. bool operator()(ssub_match const &amp;sub) const
  357. {
  358. return sub.length() == 3 || sub.length() == 6;
  359. }
  360. };
  361. // match words of 3 characters or 6 characters.
  362. sregex rx = (bow &gt;&gt; +_w &gt;&gt; eow)[ check(three_or_six()) ] ;
  363. </programlisting>Alternately, <computeroutput>check()</computeroutput> can be used to define inline custom assertions with the same syntax as is used to define semantic actions. The following code is equivalent to above:<programlisting language="c++">// match words of 3 characters or 6 characters.
  364. sregex rx = (bow &gt;&gt; +_w &gt;&gt; eow)[ check(length(_)==3 || length(_)==6) ] ;
  365. </programlisting>Within a custom assertion, <computeroutput>_</computeroutput> is a placeholder for the <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> That delineates the part of the string matched by the sub-expression to which the custom assertion was attached. </para></description></function>
  366. <function name="let"><type><emphasis>unspecified</emphasis></type><template>
  367. <template-nontype-parameter name="ArgBindings"><type>typename...</type></template-nontype-parameter>
  368. </template><parameter name="args"><paramtype>ArgBindings const &amp;...</paramtype><description><para>A set of argument bindings, where each argument binding is an assignment expression, the left hand side of which must be an instance of <computeroutput>placeholder&lt;X&gt;</computeroutput> for some <computeroutput>X</computeroutput>, and the right hand side is an lvalue of type <computeroutput>X</computeroutput>.</para></description></parameter><purpose>For binding local variables to placeholders in semantic actions when constructing a <computeroutput><classname alt="boost::xpressive::regex_iterator">regex_iterator</classname></computeroutput> or a <computeroutput><classname alt="boost::xpressive::regex_token_iterator">regex_token_iterator</classname></computeroutput>. </purpose><description><para>
  369. <computeroutput>xpressive::let()</computeroutput> serves the same purpose as <computeroutput>match_results::let()</computeroutput>; that is, it binds a placeholder to a local value. The purpose is to allow a regex with semantic actions to be defined that refers to objects that do not yet exist. Rather than referring directly to an object, a semantic action can refer to a placeholder, and the value of the placeholder can be specified later with a <emphasis>let expression</emphasis>. The <emphasis>let expression</emphasis> created with <computeroutput>let()</computeroutput> is passed to the constructor of either <computeroutput><classname alt="boost::xpressive::regex_iterator">regex_iterator</classname></computeroutput> or <computeroutput><classname alt="boost::xpressive::regex_token_iterator">regex_token_iterator</classname></computeroutput>.</para><para>See the section <link linkend="boost_xpressive.user_s_guide.semantic_actions_and_user_defined_assertions.referring_to_non_local_variables"> "Referring to Non-Local Variables"</link> in the Users' Guide for more discussion.</para><para><emphasis>Example:@code</emphasis> // Define a placeholder for a map object: placeholder&lt;std::map&lt;std::string, int&gt; &gt; _map;</para><para>// Match a word and an integer, separated by =&gt;, // and then stuff the result into a std::map&lt;&gt; sregex pair = ( (s1= +_w) &gt;&gt; "=&gt;" &gt;&gt; (s2= +_d) ) [ _map[s1] = as&lt;int&gt;(s2) ];</para><para>// The string to parse std::string str("aaa=&gt;1 bbb=&gt;23 ccc=&gt;456");</para><para>// Here is the actual map to fill in: std::map&lt;std::string, int&gt; result;</para><para>// Create a <classname alt="boost::xpressive::regex_iterator">regex_iterator</classname> to find all the matches sregex_iterator it(str.begin(), str.end(), pair, let(_map=result)); sregex_iterator end;</para><para>// step through all the matches, and fill in // the result map while(it != end) ++it;</para><para>std::cout &lt;&lt; result["aaa"] &lt;&lt; '<sbr/>
  370. '; std::cout &lt;&lt; result["bbb"] &lt;&lt; '<sbr/>
  371. '; std::cout &lt;&lt; result["ccc"] &lt;&lt; '<sbr/>
  372. '; \endcodeThe above code displays:<programlisting language="c++">1
  373. 23
  374. 456
  375. </programlisting> </para></description></function>
  376. <function name="construct"><type><emphasis>unspecified</emphasis></type><template>
  377. <template-type-parameter name="T"><purpose><para>The type of object to construct. </para></purpose></template-type-parameter>
  378. <template-nontype-parameter name="Args"><type>typename ...</type></template-nontype-parameter>
  379. </template><parameter name="args"><paramtype>Args const &amp;...</paramtype><description><para>The arguments to the constructor. </para></description></parameter><purpose>A lazy funtion for constructing objects objects of the specified type. </purpose><description><para>
  380. </para></description><returns><para>A lazy object that, when evaluated, returns <computeroutput>T(xs...)</computeroutput>, where <computeroutput>xs...</computeroutput> is the result of evaluating the lazy arguments <computeroutput>args...</computeroutput>. </para>
  381. </returns></function>
  382. </namespace>
  383. </namespace>
  384. </header>
  385. <header name="boost/xpressive/regex_algorithms.hpp">
  386. <para>Contains the regex_match(), regex_search() and regex_replace() algorithms. </para><namespace name="boost">
  387. <namespace name="xpressive">
  388. <overloaded-function name="regex_match"><signature><type>bool</type><template>
  389. <template-type-parameter name="BidiIter"/>
  390. </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the sequence. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the sequence. </para></description></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname></computeroutput> struct into which the sub_matches will be written </para></description></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regular expression object to use </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See <computeroutput>match_flag_type</computeroutput>.) </para></description></parameter></signature><signature><type>bool</type><template>
  391. <template-type-parameter name="BidiIter"/>
  392. </template><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
  393. <template-type-parameter name="Char"/>
  394. </template><parameter name="begin"><paramtype>Char *</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; Char * &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
  395. <template-type-parameter name="BidiRange"/>
  396. <template-type-parameter name="BidiIter"/>
  397. </template><parameter name="rng"><paramtype>BidiRange &amp;</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
  398. <template-type-parameter name="BidiRange"/>
  399. <template-type-parameter name="BidiIter"/>
  400. </template><parameter name="rng"><paramtype>BidiRange const &amp;</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
  401. <template-type-parameter name="Char"/>
  402. </template><parameter name="begin"><paramtype>Char *</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
  403. <template-type-parameter name="BidiRange"/>
  404. <template-type-parameter name="BidiIter"/>
  405. </template><parameter name="rng"><paramtype>BidiRange &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
  406. <template-type-parameter name="BidiRange"/>
  407. <template-type-parameter name="BidiIter"/>
  408. </template><parameter name="rng"><paramtype>BidiRange const &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><purpose>See if a regex matches a sequence from beginning to end. </purpose><description><para>Determines whether there is an exact match between the regular expression <computeroutput>re</computeroutput>, and all of the sequence <computeroutput>[begin, end)</computeroutput>.</para><para>
  409. </para></description><requires><para>Type <computeroutput>BidiIter</computeroutput> meets the requirements of a Bidirectional Iterator (24.1.4). </para>
  410. </requires><requires><para><computeroutput>[begin,end)</computeroutput> denotes a valid iterator range. </para>
  411. </requires><returns><para><computeroutput>true</computeroutput> if a match is found, <computeroutput>false</computeroutput> otherwise </para>
  412. </returns><throws><simpara><classname>regex_error</classname> on stack exhaustion </simpara></throws></overloaded-function>
  413. <overloaded-function name="regex_search"><signature><type>bool</type><template>
  414. <template-type-parameter name="BidiIter"/>
  415. </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the sequence </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the sequence </para></description></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname></computeroutput> struct into which the sub_matches will be written </para></description></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regular expression object to use </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See <computeroutput>match_flag_type</computeroutput>.) </para></description></parameter></signature><signature><type>bool</type><template>
  416. <template-type-parameter name="BidiIter"/>
  417. </template><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
  418. <template-type-parameter name="Char"/>
  419. </template><parameter name="begin"><paramtype>Char *</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; Char * &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
  420. <template-type-parameter name="BidiRange"/>
  421. <template-type-parameter name="BidiIter"/>
  422. </template><parameter name="rng"><paramtype>BidiRange &amp;</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
  423. <template-type-parameter name="BidiRange"/>
  424. <template-type-parameter name="BidiIter"/>
  425. </template><parameter name="rng"><paramtype>BidiRange const &amp;</paramtype></parameter><parameter name="what"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
  426. <template-type-parameter name="Char"/>
  427. </template><parameter name="begin"><paramtype>Char *</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>bool</type><template>
  428. <template-type-parameter name="BidiRange"/>
  429. <template-type-parameter name="BidiIter"/>
  430. </template><parameter name="rng"><paramtype>BidiRange &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>bool</type><template>
  431. <template-type-parameter name="BidiRange"/>
  432. <template-type-parameter name="BidiIter"/>
  433. </template><parameter name="rng"><paramtype>BidiRange const &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><purpose>Determines whether there is some sub-sequence within <computeroutput>[begin,end)</computeroutput> that matches the regular expression <computeroutput>re</computeroutput>. </purpose><description><para>Determines whether there is some sub-sequence within <computeroutput>[begin,end)</computeroutput> that matches the regular expression <computeroutput>re</computeroutput>.</para><para>
  434. </para></description><requires><para>Type <computeroutput>BidiIter</computeroutput> meets the requirements of a Bidirectional Iterator (24.1.4). </para>
  435. </requires><requires><para><computeroutput>[begin,end)</computeroutput> denotes a valid iterator range. </para>
  436. </requires><returns><para><computeroutput>true</computeroutput> if a match is found, <computeroutput>false</computeroutput> otherwise </para>
  437. </returns><throws><simpara><classname>regex_error</classname> on stack exhaustion </simpara></throws></overloaded-function>
  438. <overloaded-function name="regex_replace"><signature><type>OutIter</type><template>
  439. <template-type-parameter name="OutIter"/>
  440. <template-type-parameter name="BidiIter"/>
  441. <template-type-parameter name="Formatter"/>
  442. </template><parameter name="out"><paramtype>OutIter</paramtype><description><para>An output iterator into which the output sequence is written. </para></description></parameter><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the input sequence. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the input sequence. </para></description></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regular expression object to use. </para></description></parameter><parameter name="format"><paramtype>Formatter const &amp;</paramtype><description><para>The format string used to format the replacement sequence, or a formatter function, function object, or expression. </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See <computeroutput>match_flag_type</computeroutput>.) </para></description></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>OutIter</type><template>
  443. <template-type-parameter name="OutIter"/>
  444. <template-type-parameter name="BidiIter"/>
  445. </template><parameter name="out"><paramtype>OutIter</paramtype></parameter><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><signature><type>BidiContainer</type><template>
  446. <template-type-parameter name="BidiContainer"/>
  447. <template-type-parameter name="BidiIter"/>
  448. <template-type-parameter name="Formatter"/>
  449. </template><parameter name="str"><paramtype>BidiContainer &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>Formatter const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>BidiContainer</type><template>
  450. <template-type-parameter name="BidiContainer"/>
  451. <template-type-parameter name="BidiIter"/>
  452. <template-type-parameter name="Formatter"/>
  453. </template><parameter name="str"><paramtype>BidiContainer const &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>Formatter const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>std::basic_string&lt; typename remove_const&lt; Char &gt;::type &gt;</type><template>
  454. <template-type-parameter name="Char"/>
  455. <template-type-parameter name="Formatter"/>
  456. </template><parameter name="str"><paramtype>Char *</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>Formatter const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>BidiContainer</type><template>
  457. <template-type-parameter name="BidiContainer"/>
  458. <template-type-parameter name="BidiIter"/>
  459. </template><parameter name="str"><paramtype>BidiContainer &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>BidiContainer</type><template>
  460. <template-type-parameter name="BidiContainer"/>
  461. <template-type-parameter name="BidiIter"/>
  462. </template><parameter name="str"><paramtype>BidiContainer const &amp;</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter></signature><signature><type>std::basic_string&lt; typename remove_const&lt; Char &gt;::type &gt;</type><template>
  463. <template-type-parameter name="Char"/>
  464. </template><parameter name="str"><paramtype>Char *</paramtype></parameter><parameter name="re"><paramtype><classname>basic_regex</classname>&lt; Char * &gt; const &amp;</paramtype></parameter><parameter name="format"><paramtype>typename add_const&lt; Char &gt;::type *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></signature><purpose>Build an output sequence given an input sequence, a regex, and a format string or a formatter object, function, or expression. </purpose><description><para>Constructs a <computeroutput><classname alt="boost::xpressive::regex_iterator">regex_iterator</classname></computeroutput> object: <computeroutput><classname alt="boost::xpressive::regex_iterator">regex_iterator</classname>&lt; BidiIter &gt; i(begin, end, re, flags)</computeroutput>, and uses <computeroutput>i</computeroutput> to enumerate through all of the matches m of type <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname>&lt; BidiIter &gt;</computeroutput> that occur within the sequence <computeroutput>[begin, end)</computeroutput>. If no such matches are found and <computeroutput>!(flags &amp; format_no_copy)</computeroutput> then calls <computeroutput>std::copy(begin, end, out)</computeroutput>. Otherwise, for each match found, if <computeroutput>!(flags &amp; format_no_copy)</computeroutput> calls <computeroutput>std::copy(m.prefix().first, m.prefix().second, out)</computeroutput>, and then calls <computeroutput>m.format(out, format, flags)</computeroutput>. Finally if <computeroutput>!(flags &amp; format_no_copy)</computeroutput> calls <computeroutput>std::copy(last_m.suffix().first, last_m.suffix().second, out)</computeroutput> where <computeroutput>last_m</computeroutput> is a copy of the last match found.</para><para>If <computeroutput>flags &amp; format_first_only</computeroutput> is non-zero then only the first match found is replaced.</para><para>
  465. </para></description><requires><para>Type <computeroutput>BidiIter</computeroutput> meets the requirements of a Bidirectional Iterator (24.1.4). </para>
  466. </requires><requires><para>Type <computeroutput>OutIter</computeroutput> meets the requirements of an Output Iterator (24.1.2). </para>
  467. </requires><requires><para>Type <computeroutput>Formatter</computeroutput> models <computeroutput>ForwardRange</computeroutput>, <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt; &gt;</computeroutput>, <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutIter&gt;</computeroutput>, or <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutIter, regex_constants::match_flag_type&gt;</computeroutput>; or else it is a null-terminated format string, or an expression template representing a formatter lambda expression. </para>
  468. </requires><requires><para><computeroutput>[begin,end)</computeroutput> denotes a valid iterator range. </para>
  469. </requires><returns><para>The value of the output iterator after the output sequence has been written to it. </para>
  470. </returns><throws><simpara><classname>regex_error</classname> on stack exhaustion or invalid format string. </simpara></throws></overloaded-function>
  471. </namespace>
  472. </namespace>
  473. </header>
  474. <header name="boost/xpressive/regex_compiler.hpp">
  475. <para>Contains the definition of regex_compiler, a factory for building regex objects from strings. </para><namespace name="boost">
  476. <namespace name="xpressive">
  477. </namespace>
  478. </namespace>
  479. </header>
  480. <header name="boost/xpressive/regex_constants.hpp">
  481. <para>Contains definitions for the syntax_option_type, match_flag_type and error_type enumerations. </para><namespace name="boost">
  482. <namespace name="xpressive">
  483. <namespace name="regex_constants">
  484. <enum name="syntax_option_type"><enumvalue name="ECMAScript"><default>= 0</default><description><para>Specifies that the grammar recognized by the regular expression engine uses its normal semantics: that is the same as that given in the ECMA-262, ECMAScript Language Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects (FWD.1). </para></description></enumvalue><enumvalue name="icase"><default>= 1 &lt;&lt; 1</default><description><para>Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case. </para></description></enumvalue><enumvalue name="nosubs"><default>= 1 &lt;&lt; 2</default><description><para>Specifies that when a regular expression is matched against a character container sequence, then no sub-expression matches are to be stored in the supplied <classname alt="boost::xpressive::match_results">match_results</classname> structure. </para></description></enumvalue><enumvalue name="optimize"><default>= 1 &lt;&lt; 3</default><description><para>Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. </para></description></enumvalue><enumvalue name="collate"><default>= 1 &lt;&lt; 4</default><description><para>Specifies that character ranges of the form "[a-b]" should be locale sensitive. </para></description></enumvalue><enumvalue name="single_line"><default>= 1 &lt;&lt; 10</default><description><para>Specifies that the ^ and $ metacharacters DO NOT match at internal line breaks. Note that this is the opposite of the perl default. It is the inverse of perl's /m (multi-line) modifier. </para></description></enumvalue><enumvalue name="not_dot_null"><default>= 1 &lt;&lt; 11</default><description><para>Specifies that the . metacharacter does not match the null character \0. </para></description></enumvalue><enumvalue name="not_dot_newline"><default>= 1 &lt;&lt; 12</default><description><para>Specifies that the . metacharacter does not match the newline character \n. </para></description></enumvalue><enumvalue name="ignore_white_space"><default>= 1 &lt;&lt; 13</default><description><para>Specifies that non-escaped white-space is not significant. </para></description></enumvalue><description><para>Flags used to customize the regex syntax </para></description></enum>
  485. <enum name="match_flag_type"><enumvalue name="match_default"><default>= 0</default><description><para>Specifies that matching of regular expressions proceeds without any modification of the normal rules used in ECMA-262, ECMAScript Language Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects (FWD.1) </para></description></enumvalue><enumvalue name="match_not_bol"><default>= 1 &lt;&lt; 1</default><description><para>Specifies that the expression "^" should not be matched against the sub-sequence [first,first). </para></description></enumvalue><enumvalue name="match_not_eol"><default>= 1 &lt;&lt; 2</default><description><para>Specifies that the expression "\$" should not be matched against the sub-sequence [last,last). </para></description></enumvalue><enumvalue name="match_not_bow"><default>= 1 &lt;&lt; 3</default><description><para>Specifies that the expression "\\b" should not be matched against the sub-sequence [first,first). </para></description></enumvalue><enumvalue name="match_not_eow"><default>= 1 &lt;&lt; 4</default><description><para>Specifies that the expression "\\b" should not be matched against the sub-sequence [last,last). </para></description></enumvalue><enumvalue name="match_any"><default>= 1 &lt;&lt; 7</default><description><para>Specifies that if more than one match is possible then any match is an acceptable result. </para></description></enumvalue><enumvalue name="match_not_null"><default>= 1 &lt;&lt; 8</default><description><para>Specifies that the expression can not be matched against an empty sequence. </para></description></enumvalue><enumvalue name="match_continuous"><default>= 1 &lt;&lt; 10</default><description><para>Specifies that the expression must match a sub-sequence that begins at first. </para></description></enumvalue><enumvalue name="match_partial"><default>= 1 &lt;&lt; 11</default><description><para>Specifies that if no match can be found, then it is acceptable to return a match [from, last) where from != last, if there exists some sequence of characters [from,to) of which [from,last) is a prefix, and which would result in a full match. </para></description></enumvalue><enumvalue name="match_prev_avail"><default>= 1 &lt;&lt; 12</default><description><para>Specifies that –first is a valid iterator position, when this flag is set then the flags match_not_bol and match_not_bow are ignored by the regular expression algorithms (RE.7) and iterators (RE.8). </para></description></enumvalue><enumvalue name="format_default"><default>= 0</default><description><para>Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using the rules used by the ECMAScript replace function in ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace. (FWD.1). In addition during search and replace operations then all non-overlapping occurrences of the regular expression are located and replaced, and sections of the input that did not match the expression, are copied unchanged to the output string. </para></description></enumvalue><enumvalue name="format_sed"><default>= 1 &lt;&lt; 13</default><description><para>Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using the rules used by the Unix sed utility in IEEE Std 1003.1-2001, Portable Operating SystemInterface (POSIX), Shells and Utilities. </para></description></enumvalue><enumvalue name="format_perl"><default>= 1 &lt;&lt; 14</default><description><para>Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using an implementation defined superset of the rules used by the ECMAScript replace function in ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace (FWD.1). </para></description></enumvalue><enumvalue name="format_no_copy"><default>= 1 &lt;&lt; 15</default><description><para>When specified during a search and replace operation, then sections of the character container sequence being searched that do match the regular expression, are not copied to the output string. </para></description></enumvalue><enumvalue name="format_first_only"><default>= 1 &lt;&lt; 16</default><description><para>When specified during a search and replace operation, then only the first occurrence of the regular expression is replaced. </para></description></enumvalue><enumvalue name="format_literal"><default>= 1 &lt;&lt; 17</default><description><para>Treat the format string as a literal. </para></description></enumvalue><enumvalue name="format_all"><default>= 1 &lt;&lt; 18</default><description><para>Specifies that all syntax extensions are enabled, including conditional (?ddexpression1:expression2) replacements. </para></description></enumvalue><description><para>Flags used to customize the behavior of the regex algorithms </para></description></enum>
  486. <enum name="error_type"><enumvalue name="error_collate"><description><para>The expression contained an invalid collating element name. </para></description></enumvalue><enumvalue name="error_ctype"><description><para>The expression contained an invalid character class name. </para></description></enumvalue><enumvalue name="error_escape"><description><para>The expression contained an invalid escaped character, or a trailing escape. </para></description></enumvalue><enumvalue name="error_subreg"><description><para>The expression contained an invalid back-reference. </para></description></enumvalue><enumvalue name="error_brack"><description><para>The expression contained mismatched [ and ]. </para></description></enumvalue><enumvalue name="error_paren"><description><para>The expression contained mismatched ( and ). </para></description></enumvalue><enumvalue name="error_brace"><description><para>The expression contained mismatched { and }. </para></description></enumvalue><enumvalue name="error_badbrace"><description><para>The expression contained an invalid range in a {} expression. </para></description></enumvalue><enumvalue name="error_range"><description><para>The expression contained an invalid character range, for example [b-a]. </para></description></enumvalue><enumvalue name="error_space"><description><para>There was insufficient memory to convert the expression into a finite state machine. </para></description></enumvalue><enumvalue name="error_badrepeat"><description><para>One of *?+{ was not preceded by a valid regular expression. </para></description></enumvalue><enumvalue name="error_complexity"><description><para>The complexity of an attempted match against a regular expression exceeded a pre-set level. </para></description></enumvalue><enumvalue name="error_stack"><description><para>There was insufficient memory to determine whether the regular expression could match the specified character sequence. </para></description></enumvalue><enumvalue name="error_badref"><description><para>An nested regex is uninitialized. </para></description></enumvalue><enumvalue name="error_badmark"><description><para>An invalid use of a named capture. </para></description></enumvalue><enumvalue name="error_badlookbehind"><description><para>An attempt to create a variable-width look-behind assertion was detected. </para></description></enumvalue><enumvalue name="error_badrule"><description><para>An invalid use of a rule was detected. </para></description></enumvalue><enumvalue name="error_badarg"><description><para>An argument to an action was unbound. </para></description></enumvalue><enumvalue name="error_badattr"><description><para>Tried to read from an uninitialized attribute. </para></description></enumvalue><enumvalue name="error_internal"><description><para>An internal error has occurred. </para></description></enumvalue><description><para>Error codes used by the <classname alt="boost::xpressive::regex_error">regex_error</classname> type </para></description></enum>
  487. </namespace>
  488. </namespace>
  489. </namespace>
  490. </header>
  491. <header name="boost/xpressive/regex_error.hpp">
  492. <para>Contains the definition of the regex_error exception class. </para><namespace name="boost">
  493. <namespace name="xpressive">
  494. <struct name="regex_error"><inherit access="public">std::runtime_error</inherit><inherit access="public">exception</inherit><purpose>The class <classname alt="boost::xpressive::regex_error">regex_error</classname> defines the type of objects thrown as exceptions to report errors during the conversion from a string representing a regular expression to a finite state machine. </purpose><method-group name="public member functions">
  495. <method name="code" cv="const"><type>regex_constants::error_type</type><description><para>Accessor for the error_type value
  496. </para></description><returns><para>the error_type code passed to the constructor </para>
  497. </returns><throws><simpara>Will not throw.</simpara></throws></method>
  498. </method-group>
  499. <constructor specifiers="explicit"><parameter name="code"><paramtype>regex_constants::error_type</paramtype><description><para>The error_type this <classname alt="boost::xpressive::regex_error">regex_error</classname> represents. </para></description></parameter><parameter name="str"><paramtype>char const *</paramtype><default>""</default><description><para>The message string of this <classname alt="boost::xpressive::regex_error">regex_error</classname>. </para></description></parameter><description><para>Constructs an object of class <classname alt="boost::xpressive::regex_error">regex_error</classname>.
  500. </para></description><postconditions><para>code() == code </para>
  501. </postconditions></constructor>
  502. <destructor><description><para>Destructor for class <classname alt="boost::xpressive::regex_error">regex_error</classname>
  503. </para></description><throws><simpara>Will not throw.</simpara></throws></destructor>
  504. </struct>
  505. </namespace>
  506. </namespace>
  507. <macro name="BOOST_XPR_ENSURE_" kind="functionlike"><macro-parameter name="pred"/><macro-parameter name="code"/><macro-parameter name="msg"/></macro>
  508. </header>
  509. <header name="boost/xpressive/regex_iterator.hpp">
  510. <para>Contains the definition of the regex_iterator type, an STL-compatible iterator for stepping through all the matches in a sequence. </para><namespace name="boost">
  511. <namespace name="xpressive">
  512. </namespace>
  513. </namespace>
  514. </header>
  515. <header name="boost/xpressive/regex_primitives.hpp">
  516. <para>Contains the syntax elements for writing static regular expressions. </para><namespace name="boost">
  517. <namespace name="xpressive">
  518. <struct name="mark_tag"><purpose>Sub-match placeholder type, used to create named captures in static regexes. </purpose><description><para><computeroutput><classname alt="boost::xpressive::mark_tag">mark_tag</classname></computeroutput> is the type of the global sub-match placeholders <computeroutput>s0</computeroutput>, <computeroutput>s1</computeroutput>, etc.. You can use the <computeroutput><classname alt="boost::xpressive::mark_tag">mark_tag</classname></computeroutput> type to create your own sub-match placeholders with more meaningful names. This is roughly equivalent to the "named capture" feature of dynamic regular expressions.</para><para>To create a named sub-match placeholder, initialize it with a unique integer. The integer must only be unique within the regex in which the placeholder is used. Then you can use it within static regexes to created sub-matches by assigning a sub-expression to it, or to refer back to already created sub-matches.</para><para><programlisting language="c++">mark_tag number(1); // "number" is now equivalent to "s1"
  519. // Match a number, followed by a space and the same number again
  520. sregex rx = (number = +_d) &gt;&gt; ' ' &gt;&gt; number;
  521. </programlisting></para><para>After a successful <computeroutput>regex_match()</computeroutput> or <computeroutput>regex_search()</computeroutput>, the sub-match placeholder can be used to index into the <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt;</computeroutput> object to retrieve the corresponding sub-match. </para></description><method-group name="private static functions">
  522. <method name="make_tag" specifiers="static"><type><emphasis>unspecified</emphasis></type><parameter name="mark_nbr"><paramtype>int</paramtype></parameter></method>
  523. </method-group>
  524. <method-group name="public member functions">
  525. </method-group>
  526. <constructor><parameter name="mark_nbr"><paramtype>int</paramtype><description><para>An integer that uniquely identifies this <computeroutput><classname alt="boost::xpressive::mark_tag">mark_tag</classname></computeroutput> within the static regexes in which this <computeroutput><classname alt="boost::xpressive::mark_tag">mark_tag</classname></computeroutput> will be used. </para></description></parameter><purpose>Initialize a <classname alt="boost::xpressive::mark_tag">mark_tag</classname> placeholder. </purpose><description><para>
  527. </para></description><requires><para><computeroutput>mark_nbr &gt; 0</computeroutput> </para>
  528. </requires></constructor>
  529. </struct><data-member name="inf"><type>unsigned int const</type><purpose>For infinite repetition of a sub-expression. </purpose><description><para>Magic value used with the repeat&lt;&gt;() function template to specify an unbounded repeat. Use as: repeat&lt;17, inf&gt;('a'). The equivalent in perl is /a{17,}/. </para></description></data-member>
  530. <data-member name="nil"><type><emphasis>unspecified</emphasis></type><purpose>Successfully matches nothing. </purpose><description><para>Successfully matches a zero-width sequence. nil always succeeds and never consumes any characters. </para></description></data-member>
  531. <data-member name="alnum"><type><emphasis>unspecified</emphasis></type><purpose>Matches an alpha-numeric character. </purpose><description><para>The regex traits are used to determine which characters are alpha-numeric. To match any character that is not alpha-numeric, use ~alnum.</para><para><note><para>alnum is equivalent to /[[:alnum:]]/ in perl. ~alnum is equivalent to /[[:^alnum:]]/ in perl. </para>
  532. </note>
  533. </para></description></data-member>
  534. <data-member name="alpha"><type><emphasis>unspecified</emphasis></type><purpose>Matches an alphabetic character. </purpose><description><para>The regex traits are used to determine which characters are alphabetic. To match any character that is not alphabetic, use ~alpha.</para><para><note><para>alpha is equivalent to /[[:alpha:]]/ in perl. ~alpha is equivalent to /[[:^alpha:]]/ in perl. </para>
  535. </note>
  536. </para></description></data-member>
  537. <data-member name="blank"><type><emphasis>unspecified</emphasis></type><purpose>Matches a blank (horizonal white-space) character. </purpose><description><para>The regex traits are used to determine which characters are blank characters. To match any character that is not blank, use ~blank.</para><para><note><para>blank is equivalent to /[[:blank:]]/ in perl. ~blank is equivalent to /[[:^blank:]]/ in perl. </para>
  538. </note>
  539. </para></description></data-member>
  540. <data-member name="cntrl"><type><emphasis>unspecified</emphasis></type><purpose>Matches a control character. </purpose><description><para>The regex traits are used to determine which characters are control characters. To match any character that is not a control character, use ~cntrl.</para><para><note><para>cntrl is equivalent to /[[:cntrl:]]/ in perl. ~cntrl is equivalent to /[[:^cntrl:]]/ in perl. </para>
  541. </note>
  542. </para></description></data-member>
  543. <data-member name="digit"><type><emphasis>unspecified</emphasis></type><purpose>Matches a digit character. </purpose><description><para>The regex traits are used to determine which characters are digits. To match any character that is not a digit, use ~digit.</para><para><note><para>digit is equivalent to /[[:digit:]]/ in perl. ~digit is equivalent to /[[:^digit:]]/ in perl. </para>
  544. </note>
  545. </para></description></data-member>
  546. <data-member name="graph"><type><emphasis>unspecified</emphasis></type><purpose>Matches a graph character. </purpose><description><para>The regex traits are used to determine which characters are graphable. To match any character that is not graphable, use ~graph.</para><para><note><para>graph is equivalent to /[[:graph:]]/ in perl. ~graph is equivalent to /[[:^graph:]]/ in perl. </para>
  547. </note>
  548. </para></description></data-member>
  549. <data-member name="lower"><type><emphasis>unspecified</emphasis></type><purpose>Matches a lower-case character. </purpose><description><para>The regex traits are used to determine which characters are lower-case. To match any character that is not a lower-case character, use ~lower.</para><para><note><para>lower is equivalent to /[[:lower:]]/ in perl. ~lower is equivalent to /[[:^lower:]]/ in perl. </para>
  550. </note>
  551. </para></description></data-member>
  552. <data-member name="print"><type><emphasis>unspecified</emphasis></type><purpose>Matches a printable character. </purpose><description><para>The regex traits are used to determine which characters are printable. To match any character that is not printable, use ~print.</para><para><note><para>print is equivalent to /[[:print:]]/ in perl. ~print is equivalent to /[[:^print:]]/ in perl. </para>
  553. </note>
  554. </para></description></data-member>
  555. <data-member name="punct"><type><emphasis>unspecified</emphasis></type><purpose>Matches a punctuation character. </purpose><description><para>The regex traits are used to determine which characters are punctuation. To match any character that is not punctuation, use ~punct.</para><para><note><para>punct is equivalent to /[[:punct:]]/ in perl. ~punct is equivalent to /[[:^punct:]]/ in perl. </para>
  556. </note>
  557. </para></description></data-member>
  558. <data-member name="space"><type><emphasis>unspecified</emphasis></type><purpose>Matches a space character. </purpose><description><para>The regex traits are used to determine which characters are space characters. To match any character that is not white-space, use ~space.</para><para><note><para>space is equivalent to /[[:space:]]/ in perl. ~space is equivalent to /[[:^space:]]/ in perl. </para>
  559. </note>
  560. </para></description></data-member>
  561. <data-member name="upper"><type><emphasis>unspecified</emphasis></type><purpose>Matches an upper-case character. </purpose><description><para>The regex traits are used to determine which characters are upper-case. To match any character that is not upper-case, use ~upper.</para><para><note><para>upper is equivalent to /[[:upper:]]/ in perl. ~upper is equivalent to /[[:^upper:]]/ in perl. </para>
  562. </note>
  563. </para></description></data-member>
  564. <data-member name="xdigit"><type><emphasis>unspecified</emphasis></type><purpose>Matches a hexadecimal digit character. </purpose><description><para>The regex traits are used to determine which characters are hex digits. To match any character that is not a hex digit, use ~xdigit.</para><para><note><para>xdigit is equivalent to /[[:xdigit:]]/ in perl. ~xdigit is equivalent to /[[:^xdigit:]]/ in perl. </para>
  565. </note>
  566. </para></description></data-member>
  567. <data-member name="bos"><type><emphasis>unspecified</emphasis></type><purpose>Beginning of sequence assertion. </purpose><description><para>For the character sequence [begin, end), 'bos' matches the zero-width sub-sequence [begin, begin). </para></description></data-member>
  568. <data-member name="eos"><type><emphasis>unspecified</emphasis></type><purpose>End of sequence assertion. </purpose><description><para>For the character sequence [begin, end), 'eos' matches the zero-width sub-sequence [end, end).</para><para><note><para>Unlike the perl end of sequence assertion $, 'eos' will not match at the position [end-1, end-1) if *(end-1) is '\n'. To get that behavior, use (!_n &gt;&gt; eos). </para>
  569. </note>
  570. </para></description></data-member>
  571. <data-member name="bol"><type><emphasis>unspecified</emphasis></type><purpose>Beginning of line assertion. </purpose><description><para>'bol' matches the zero-width sub-sequence immediately following a logical newline sequence. The regex traits is used to determine what constitutes a logical newline sequence. </para></description></data-member>
  572. <data-member name="eol"><type><emphasis>unspecified</emphasis></type><purpose>End of line assertion. </purpose><description><para>'eol' matches the zero-width sub-sequence immediately preceeding a logical newline sequence. The regex traits is used to determine what constitutes a logical newline sequence. </para></description></data-member>
  573. <data-member name="bow"><type><emphasis>unspecified</emphasis></type><purpose>Beginning of word assertion. </purpose><description><para>'bow' matches the zero-width sub-sequence immediately following a non-word character and preceeding a word character. The regex traits are used to determine what constitutes a word character. </para></description></data-member>
  574. <data-member name="eow"><type><emphasis>unspecified</emphasis></type><purpose>End of word assertion. </purpose><description><para>'eow' matches the zero-width sub-sequence immediately following a word character and preceeding a non-word character. The regex traits are used to determine what constitutes a word character. </para></description></data-member>
  575. <data-member name="_b"><type><emphasis>unspecified</emphasis></type><purpose>Word boundary assertion. </purpose><description><para>'_b' matches the zero-width sub-sequence at the beginning or the end of a word. It is equivalent to (bow | eow). The regex traits are used to determine what constitutes a word character. To match a non-word boundary, use ~_b.</para><para><note><para>_b is like \b in perl. ~_b is like \B in perl. </para>
  576. </note>
  577. </para></description></data-member>
  578. <data-member name="_w"><type><emphasis>unspecified</emphasis></type><purpose>Matches a word character. </purpose><description><para>'_w' matches a single word character. The regex traits are used to determine which characters are word characters. Use ~_w to match a character that is not a word character.</para><para><note><para>_w is like \w in perl. ~_w is like \W in perl. </para>
  579. </note>
  580. </para></description></data-member>
  581. <data-member name="_d"><type><emphasis>unspecified</emphasis></type><purpose>Matches a digit character. </purpose><description><para>'_d' matches a single digit character. The regex traits are used to determine which characters are digits. Use ~_d to match a character that is not a digit character.</para><para><note><para>_d is like \d in perl. ~_d is like \D in perl. </para>
  582. </note>
  583. </para></description></data-member>
  584. <data-member name="_s"><type><emphasis>unspecified</emphasis></type><purpose>Matches a space character. </purpose><description><para>'_s' matches a single space character. The regex traits are used to determine which characters are space characters. Use ~_s to match a character that is not a space character.</para><para><note><para>_s is like \s in perl. ~_s is like \S in perl. </para>
  585. </note>
  586. </para></description></data-member>
  587. <data-member name="_n"><type>proto::terminal&lt; char &gt;::type const</type><purpose>Matches a literal newline character, '\n'. </purpose><description><para>'_n' matches a single newline character, '\n'. Use ~_n to match a character that is not a newline.</para><para><note><para>~_n is like '.' in perl without the /s modifier. </para>
  588. </note>
  589. </para></description></data-member>
  590. <data-member name="_ln"><type><emphasis>unspecified</emphasis></type><purpose>Matches a logical newline sequence. </purpose><description><para>'_ln' matches a logical newline sequence. This can be any character in the line separator class, as determined by the regex traits, or the '\r\n' sequence. For the purpose of back-tracking, '\r\n' is treated as a unit. To match any one character that is not a logical newline, use ~_ln. </para></description></data-member>
  591. <data-member name="_"><type><emphasis>unspecified</emphasis></type><purpose>Matches any one character. </purpose><description><para>Match any character, similar to '.' in perl syntax with the /s modifier. '_' matches any one character, including the newline.</para><para><note><para>To match any character except the newline, use ~_n </para>
  592. </note>
  593. </para></description></data-member>
  594. <data-member name="self"><type><emphasis>unspecified</emphasis></type><purpose>Reference to the current regex object. </purpose><description><para>Useful when constructing recursive regular expression objects. The 'self' identifier is a short-hand for the current regex object. For instance, sregex rx = '(' &gt;&gt; (self | nil) &gt;&gt; ')'; will create a regex object that matches balanced parens such as "((()))". </para></description></data-member>
  595. <data-member name="set"><type><emphasis>unspecified</emphasis></type><purpose>Used to create character sets. </purpose><description><para>There are two ways to create character sets with the 'set' identifier. The easiest is to create a comma-separated list of the characters in the set, as in (set= 'a','b','c'). This set will match 'a', 'b', or 'c'. The other way is to define the set as an argument to the set subscript operator. For instance, set[ 'a' | range('b','c') | digit ] will match an 'a', 'b', 'c' or a digit character.</para><para>To complement a set, apply the '~' operator. For instance, ~(set= 'a','b','c') will match any character that is not an 'a', 'b', or 'c'.</para><para>Sets can be composed of other, possibly complemented, sets. For instance, set[ ~digit | ~(set= 'a','b','c') ]. </para></description></data-member>
  596. <data-member name="s0"><type><classname>mark_tag</classname> const</type><purpose>Sub-match placeholder, like $&amp; in Perl. </purpose></data-member>
  597. <data-member name="s1"><type><classname>mark_tag</classname> const</type><purpose>Sub-match placeholder, like $1 in perl. </purpose><description><para>To create a sub-match, assign a sub-expression to the sub-match placeholder. For instance, (s1= _) will match any one character and remember which character was matched in the 1st sub-match. Later in the pattern, you can refer back to the sub-match. For instance, (s1= _) &gt;&gt; s1 will match any character, and then match the same character again.</para><para>After a successful regex_match() or regex_search(), the sub-match placeholders can be used to index into the <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt; object to retrieve the Nth sub-match. </para></description></data-member>
  598. <data-member name="s2"><type><classname>mark_tag</classname> const</type></data-member>
  599. <data-member name="s3"><type><classname>mark_tag</classname> const</type></data-member>
  600. <data-member name="s4"><type><classname>mark_tag</classname> const</type></data-member>
  601. <data-member name="s5"><type><classname>mark_tag</classname> const</type></data-member>
  602. <data-member name="s6"><type><classname>mark_tag</classname> const</type></data-member>
  603. <data-member name="s7"><type><classname>mark_tag</classname> const</type></data-member>
  604. <data-member name="s8"><type><classname>mark_tag</classname> const</type></data-member>
  605. <data-member name="s9"><type><classname>mark_tag</classname> const</type></data-member>
  606. <data-member name="a1"><type><emphasis>unspecified</emphasis></type></data-member>
  607. <data-member name="a2"><type><emphasis>unspecified</emphasis></type></data-member>
  608. <data-member name="a3"><type><emphasis>unspecified</emphasis></type></data-member>
  609. <data-member name="a4"><type><emphasis>unspecified</emphasis></type></data-member>
  610. <data-member name="a5"><type><emphasis>unspecified</emphasis></type></data-member>
  611. <data-member name="a6"><type><emphasis>unspecified</emphasis></type></data-member>
  612. <data-member name="a7"><type><emphasis>unspecified</emphasis></type></data-member>
  613. <data-member name="a8"><type><emphasis>unspecified</emphasis></type></data-member>
  614. <data-member name="a9"><type><emphasis>unspecified</emphasis></type></data-member>
  615. <function name="icase"><type><emphasis>unspecified</emphasis></type><template>
  616. <template-type-parameter name="Expr"/>
  617. </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><purpose>Makes a sub-expression case-insensitive. </purpose><description><para>Use icase() to make a sub-expression case-insensitive. For instance, "foo" &gt;&gt; icase(set['b'] &gt;&gt; "ar") will match "foo" exactly followed by "bar" irrespective of case. </para></description></function>
  618. <function name="as_xpr"><type><emphasis>unspecified</emphasis></type><template>
  619. <template-type-parameter name="Literal"/>
  620. </template><parameter name="literal"><paramtype>Literal const &amp;</paramtype></parameter><purpose>Makes a literal into a regular expression. </purpose><description><para>Use as_xpr() to turn a literal into a regular expression. For instance, "foo" &gt;&gt; "bar" will not compile because both operands to the right-shift operator are const char*, and no such operator exists. Use as_xpr("foo") &gt;&gt; "bar" instead.</para><para>You can use as_xpr() with character literals in addition to string literals. For instance, as_xpr('a') will match an 'a'. You can also complement a character literal, as with ~as_xpr('a'). This will match any one character that is not an 'a'. </para></description></function>
  621. <function name="by_ref"><type>proto::terminal&lt; reference_wrapper&lt; <classname>basic_regex</classname>&lt; BidiIter &gt; const &gt; &gt;::type const</type><template>
  622. <template-type-parameter name="BidiIter"/>
  623. </template><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object to embed by reference. </para></description></parameter><purpose>Embed a regex object by reference. </purpose><description><para>
  624. </para></description></function>
  625. <function name="range"><type><emphasis>unspecified</emphasis></type><template>
  626. <template-type-parameter name="Char"/>
  627. </template><parameter name="ch_min"><paramtype>Char</paramtype><description><para>The lower end of the range to match. </para></description></parameter><parameter name="ch_max"><paramtype>Char</paramtype><description><para>The upper end of the range to match. </para></description></parameter><purpose>Match a range of characters. </purpose><description><para>Match any character in the range [ch_min, ch_max].</para><para>
  628. </para></description></function>
  629. <function name="optional"><type>proto::result_of::make_expr&lt; proto::tag::logical_not, proto::default_domain, Expr const &amp; &gt;::type const</type><template>
  630. <template-type-parameter name="Expr"/>
  631. </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to make optional. </para></description></parameter><purpose>Make a sub-expression optional. Equivalent to !as_xpr(expr). </purpose><description><para>
  632. </para></description></function>
  633. <overloaded-function name="repeat"><signature><type><emphasis>unspecified</emphasis></type><template>
  634. <template-nontype-parameter name="Min"><type>unsigned int</type></template-nontype-parameter>
  635. <template-nontype-parameter name="Max"><type>unsigned int</type></template-nontype-parameter>
  636. <template-type-parameter name="Expr"/>
  637. </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to repeat. </para></description></parameter></signature><signature><type><emphasis>unspecified</emphasis></type><template>
  638. <template-nontype-parameter name="Count"><type>unsigned int</type></template-nontype-parameter>
  639. <template-type-parameter name="Expr2"/>
  640. </template><parameter name="expr2"><paramtype>Expr2 const &amp;</paramtype></parameter></signature><purpose>Repeat a sub-expression multiple times. </purpose><description><para>There are two forms of the repeat&lt;&gt;() function template. To match a sub-expression N times, use repeat&lt;N&gt;(expr). To match a sub-expression from M to N times, use repeat&lt;M,N&gt;(expr).</para><para>The repeat&lt;&gt;() function creates a greedy quantifier. To make the quantifier non-greedy, apply the unary minus operator, as in -repeat&lt;M,N&gt;(expr).</para><para>
  641. </para></description></overloaded-function>
  642. <function name="keep"><type><emphasis>unspecified</emphasis></type><template>
  643. <template-type-parameter name="Expr"/>
  644. </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to modify. </para></description></parameter><purpose>Create an independent sub-expression. </purpose><description><para>Turn off back-tracking for a sub-expression. Any branches or repeats within the sub-expression will match only one way, and no other alternatives are tried.</para><para><note><para>keep(expr) is equivalent to the perl (?&gt;...) extension.</para>
  645. </note>
  646. </para></description></function>
  647. <function name="before"><type><emphasis>unspecified</emphasis></type><template>
  648. <template-type-parameter name="Expr"/>
  649. </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to put in the look-ahead assertion. </para></description></parameter><purpose>Look-ahead assertion. </purpose><description><para>before(expr) succeeds if the expr sub-expression would match at the current position in the sequence, but expr is not included in the match. For instance, before("foo") succeeds if we are before a "foo". Look-ahead assertions can be negated with the bit-compliment operator.</para><para><note><para>before(expr) is equivalent to the perl (?=...) extension. ~before(expr) is a negative look-ahead assertion, equivalent to the perl (?!...) extension.</para>
  650. </note>
  651. </para></description></function>
  652. <function name="after"><type><emphasis>unspecified</emphasis></type><template>
  653. <template-type-parameter name="Expr"/>
  654. </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The sub-expression to put in the look-ahead assertion.</para></description></parameter><purpose>Look-behind assertion. </purpose><description><para>after(expr) succeeds if the expr sub-expression would match at the current position minus N in the sequence, where N is the width of expr. expr is not included in the match. For instance, after("foo") succeeds if we are after a "foo". Look-behind assertions can be negated with the bit-complement operator.</para><para><note><para>after(expr) is equivalent to the perl (?&lt;=...) extension. ~after(expr) is a negative look-behind assertion, equivalent to the perl (?&lt;!...) extension.</para>
  655. </note>
  656. </para></description><requires><para>expr cannot match a variable number of characters. </para>
  657. </requires></function>
  658. <function name="imbue"><type><emphasis>unspecified</emphasis></type><template>
  659. <template-type-parameter name="Locale"/>
  660. </template><parameter name="loc"><paramtype>Locale const &amp;</paramtype><description><para>The std::locale or regex traits object. </para></description></parameter><purpose>Specify a regex traits or a std::locale. </purpose><description><para>imbue() instructs the regex engine to use the specified traits or locale when matching the regex. The entire expression must use the same traits/locale. For instance, the following specifies a locale for use with a regex: std::locale loc; sregex rx = imbue(loc)(+digit);</para><para>
  661. </para></description></function>
  662. <function name="skip"><type><emphasis>unspecified</emphasis></type><template>
  663. <template-type-parameter name="Skip"/>
  664. </template><parameter name="skip"><paramtype>Skip const &amp;</paramtype><description><para>A regex that specifies which characters to skip. </para></description></parameter><purpose>Specify which characters to skip when matching a regex. </purpose><description><para><computeroutput>skip()</computeroutput> instructs the regex engine to skip certain characters when matching a regex. It is most useful for writing regexes that ignore whitespace. For instance, the following specifies a regex that skips whitespace and punctuation:</para><para><programlisting language="c++">// A sentence is one or more words separated by whitespace
  665. // and punctuation.
  666. sregex word = +alpha;
  667. sregex sentence = skip(set[_s | punct])( +word );
  668. </programlisting></para><para>The way it works in the above example is to insert <computeroutput>keep(*set[_s | punct])</computeroutput> before each primitive within the regex. A "primitive" includes terminals like strings, character sets and nested regexes. A final <computeroutput>*set[_s | punct]</computeroutput> is added to the end of the regex. The regex <computeroutput>sentence</computeroutput> specified above is equivalent to the following:</para><para><programlisting language="c++">sregex sentence = +( keep(*set[_s | punct]) &gt;&gt; word )
  669. &gt;&gt; *set[_s | punct];
  670. </programlisting></para><para><note><para>Skipping does not affect how nested regexes are handled because they are treated atomically. String literals are also treated atomically; that is, no skipping is done within a string literal. So <computeroutput>skip(_s)("this that")</computeroutput> is not the same as <computeroutput>skip(_s)("this" &gt;&gt; as_xpr("that"))</computeroutput>. The first will only match when there is only one space between "this" and "that". The second will skip any and all whitespace between "this" and "that".</para>
  671. </note>
  672. </para></description></function>
  673. </namespace>
  674. </namespace>
  675. </header>
  676. <header name="boost/xpressive/regex_token_iterator.hpp">
  677. <para>Contains the definition of regex_token_iterator, and STL-compatible iterator for tokenizing a string using a regular expression. </para><namespace name="boost">
  678. <namespace name="xpressive">
  679. </namespace>
  680. </namespace>
  681. </header>
  682. <header name="boost/xpressive/regex_traits.hpp">
  683. <para>Includes the C regex traits or the CPP regex traits header file depending on the BOOST_XPRESSIVE_USE_C_TRAITS macro. </para><namespace name="boost">
  684. <namespace name="xpressive">
  685. <struct name="regex_traits_version_1_tag"><description><para>Tag used to denote that a traits class conforms to the version 1 traits interface. </para></description></struct><struct name="regex_traits_version_2_tag"><inherit access="public">boost::xpressive::regex_traits_version_1_tag</inherit><description><para>Tag used to denote that a traits class conforms to the version 2 traits interface. </para></description></struct>
  686. </namespace>
  687. </namespace>
  688. </header>
  689. <header name="boost/xpressive/sub_match.hpp">
  690. <para>Contains the definition of the class template sub_match&lt;&gt; and associated helper functions </para><namespace name="boost">
  691. <namespace name="xpressive">
  692. <overloaded-function name="range_begin"><signature><type>BidiIter</type><template>
  693. <template-type-parameter name="BidiIter"/>
  694. </template><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>the <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> object denoting the range </para></description></parameter></signature><signature><type>BidiIter</type><template>
  695. <template-type-parameter name="BidiIter"/>
  696. </template><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></signature><purpose><computeroutput>range_begin()</computeroutput> to make <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> a valid range </purpose><description><para>
  697. </para></description><requires><para><computeroutput>sub.first</computeroutput> is not singular </para>
  698. </requires><returns><para><computeroutput>sub.first</computeroutput> </para>
  699. </returns></overloaded-function>
  700. <overloaded-function name="range_end"><signature><type>BidiIter</type><template>
  701. <template-type-parameter name="BidiIter"/>
  702. </template><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>the <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> object denoting the range </para></description></parameter></signature><signature><type>BidiIter</type><template>
  703. <template-type-parameter name="BidiIter"/>
  704. </template><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></signature><purpose><computeroutput>range_end()</computeroutput> to make <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> a valid range </purpose><description><para>
  705. </para></description><requires><para><computeroutput>sub.second</computeroutput> is not singular </para>
  706. </requires><returns><para><computeroutput>sub.second</computeroutput> </para>
  707. </returns></overloaded-function>
  708. <function name="operator&lt;&lt;"><type>std::basic_ostream&lt; Char, Traits &gt; &amp;</type><template>
  709. <template-type-parameter name="BidiIter"/>
  710. <template-type-parameter name="Char"/>
  711. <template-type-parameter name="Traits"/>
  712. </template><parameter name="sout"><paramtype>std::basic_ostream&lt; Char, Traits &gt; &amp;</paramtype><description><para>output stream. </para></description></parameter><parameter name="sub"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para><classname alt="boost::xpressive::sub_match">sub_match</classname> object to be written to the stream. </para></description></parameter><purpose>insertion operator for sending sub-matches to ostreams </purpose><description><para>
  713. </para></description><returns><para>sout &lt;&lt; sub.str() </para>
  714. </returns></function>
  715. <function name="operator=="><type>bool</type><template>
  716. <template-type-parameter name="BidiIter"/>
  717. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  718. <function name="operator!="><type>bool</type><template>
  719. <template-type-parameter name="BidiIter"/>
  720. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  721. <function name="operator&lt;"><type>bool</type><template>
  722. <template-type-parameter name="BidiIter"/>
  723. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  724. <function name="operator&lt;="><type>bool</type><template>
  725. <template-type-parameter name="BidiIter"/>
  726. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  727. <function name="operator&gt;="><type>bool</type><template>
  728. <template-type-parameter name="BidiIter"/>
  729. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  730. <function name="operator&gt;"><type>bool</type><template>
  731. <template-type-parameter name="BidiIter"/>
  732. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  733. <function name="operator=="><type>bool</type><template>
  734. <template-type-parameter name="BidiIter"/>
  735. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  736. <function name="operator!="><type>bool</type><template>
  737. <template-type-parameter name="BidiIter"/>
  738. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  739. <function name="operator&lt;"><type>bool</type><template>
  740. <template-type-parameter name="BidiIter"/>
  741. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  742. <function name="operator&gt;"><type>bool</type><template>
  743. <template-type-parameter name="BidiIter"/>
  744. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  745. <function name="operator&gt;="><type>bool</type><template>
  746. <template-type-parameter name="BidiIter"/>
  747. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  748. <function name="operator&lt;="><type>bool</type><template>
  749. <template-type-parameter name="BidiIter"/>
  750. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  751. <function name="operator=="><type>bool</type><template>
  752. <template-type-parameter name="BidiIter"/>
  753. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
  754. <function name="operator!="><type>bool</type><template>
  755. <template-type-parameter name="BidiIter"/>
  756. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
  757. <function name="operator&lt;"><type>bool</type><template>
  758. <template-type-parameter name="BidiIter"/>
  759. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
  760. <function name="operator&gt;"><type>bool</type><template>
  761. <template-type-parameter name="BidiIter"/>
  762. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
  763. <function name="operator&gt;="><type>bool</type><template>
  764. <template-type-parameter name="BidiIter"/>
  765. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
  766. <function name="operator&lt;="><type>bool</type><template>
  767. <template-type-parameter name="BidiIter"/>
  768. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
  769. <function name="operator=="><type>bool</type><template>
  770. <template-type-parameter name="BidiIter"/>
  771. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  772. <function name="operator!="><type>bool</type><template>
  773. <template-type-parameter name="BidiIter"/>
  774. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  775. <function name="operator&lt;"><type>bool</type><template>
  776. <template-type-parameter name="BidiIter"/>
  777. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  778. <function name="operator&gt;"><type>bool</type><template>
  779. <template-type-parameter name="BidiIter"/>
  780. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  781. <function name="operator&gt;="><type>bool</type><template>
  782. <template-type-parameter name="BidiIter"/>
  783. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  784. <function name="operator&lt;="><type>bool</type><template>
  785. <template-type-parameter name="BidiIter"/>
  786. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  787. <function name="operator=="><type>bool</type><template>
  788. <template-type-parameter name="BidiIter"/>
  789. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
  790. <function name="operator!="><type>bool</type><template>
  791. <template-type-parameter name="BidiIter"/>
  792. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
  793. <function name="operator&lt;"><type>bool</type><template>
  794. <template-type-parameter name="BidiIter"/>
  795. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
  796. <function name="operator&gt;"><type>bool</type><template>
  797. <template-type-parameter name="BidiIter"/>
  798. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
  799. <function name="operator&gt;="><type>bool</type><template>
  800. <template-type-parameter name="BidiIter"/>
  801. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
  802. <function name="operator&lt;="><type>bool</type><template>
  803. <template-type-parameter name="BidiIter"/>
  804. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
  805. <function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
  806. <template-type-parameter name="BidiIter"/>
  807. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  808. <function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
  809. <template-type-parameter name="BidiIter"/>
  810. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter></function>
  811. <function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
  812. <template-type-parameter name="BidiIter"/>
  813. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  814. <function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
  815. <template-type-parameter name="BidiIter"/>
  816. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter></function>
  817. <function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
  818. <template-type-parameter name="BidiIter"/>
  819. </template><parameter name="lhs"><paramtype>typename iterator_value&lt; BidiIter &gt;::type const *</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  820. <function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
  821. <template-type-parameter name="BidiIter"/>
  822. </template><parameter name="lhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="rhs"><paramtype>typename <classname>sub_match</classname>&lt; BidiIter &gt;::string_type const &amp;</paramtype></parameter></function>
  823. <function name="operator+"><type><classname>sub_match</classname>&lt; BidiIter &gt;::string_type</type><template>
  824. <template-type-parameter name="BidiIter"/>
  825. </template><parameter name="lhs"><paramtype>typename <classname>sub_match</classname>&lt; BidiIter &gt;::string_type const &amp;</paramtype></parameter><parameter name="rhs"><paramtype><classname>sub_match</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></function>
  826. </namespace>
  827. </namespace>
  828. </header>
  829. <header name="boost/xpressive/traits/c_regex_traits.hpp">
  830. <para>Contains the definition of the c_regex_traits&lt;&gt; template, which is a wrapper for the C locale functions that can be used to customize the behavior of static and dynamic regexes. </para><namespace name="boost">
  831. <namespace name="xpressive">
  832. <struct-specialization name="has_fold_case"><template>
  833. </template><specialization><template-arg>c_regex_traits&lt; char &gt;</template-arg></specialization><inherit access="public">true_</inherit></struct-specialization>
  834. </namespace>
  835. </namespace>
  836. </header>
  837. <header name="boost/xpressive/traits/cpp_regex_traits.hpp">
  838. <para>Contains the definition of the cpp_regex_traits&lt;&gt; template, which is a wrapper for std::locale that can be used to customize the behavior of static and dynamic regexes. </para><namespace name="boost">
  839. <namespace name="xpressive">
  840. <struct-specialization name="has_fold_case"><template>
  841. </template><specialization><template-arg>cpp_regex_traits&lt; char &gt;</template-arg></specialization><inherit access="public">true_</inherit></struct-specialization>
  842. </namespace>
  843. </namespace>
  844. </header>
  845. <header name="boost/xpressive/traits/null_regex_traits.hpp">
  846. <para>Contains the definition of the null_regex_traits&lt;&gt; template, which is a stub regex traits implementation that can be used by static and dynamic regexes for searching non-character data. </para><namespace name="boost">
  847. <namespace name="xpressive">
  848. </namespace>
  849. </namespace>
  850. </header>
  851. <header name="boost/xpressive/xpressive.hpp">
  852. <para>Includes all of xpressive including support for both static and dynamic regular expressions. </para></header>
  853. <header name="boost/xpressive/xpressive_dynamic.hpp">
  854. <para>Includes everything you need to write and use dynamic regular expressions. </para></header>
  855. <header name="boost/xpressive/xpressive_fwd.hpp">
  856. <para>Forward declarations for all of xpressive's public data types. </para><namespace name="boost">
  857. <namespace name="xpressive">
  858. <struct name="basic_regex"><template>
  859. <template-type-parameter name="BidiIter"/>
  860. </template><purpose>Class template <classname alt="boost::xpressive::basic_regex">basic_regex</classname>&lt;&gt; is a class for holding a compiled regular expression. </purpose><method-group name="public member functions">
  861. <method name="mark_count" cv="const"><type>std::size_t</type><description><para>Returns the count of capturing sub-expressions in this regular expression </para></description></method>
  862. <method name="regex_id" cv="const"><type>regex_id_type</type><description><para>Returns a token which uniquely identifies this regular expression. </para></description></method>
  863. <method name="swap"><type>void</type><parameter name="that"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The other <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object. </para></description></parameter><description><para>Swaps the contents of this <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object with another.</para><para>
  864. <note><para>This is a shallow swap that does not do reference tracking. If you embed a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object by reference in another regular expression and then swap its contents with another <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object, the change will not be visible to the enclosing regular expression. It is done this way to ensure that swap() cannot throw. </para>
  865. </note>
  866. </para></description><throws><simpara>Will not throw.</simpara></throws></method>
  867. </method-group>
  868. <constructor><description><para>
  869. </para></description><postconditions><para>regex_id() == 0 </para>
  870. </postconditions><postconditions><para>mark_count() == 0 </para>
  871. </postconditions></constructor>
  872. <constructor><parameter name="that"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object to copy. </para></description></parameter><description><para>
  873. </para></description><postconditions><para>regex_id() == that.regex_id() </para>
  874. </postconditions><postconditions><para>mark_count() == that.mark_count() </para>
  875. </postconditions></constructor>
  876. <copy-assignment><type><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</type><parameter name="that"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object to copy. </para></description></parameter><description><para>
  877. </para></description><postconditions><para>regex_id() == that.regex_id() </para>
  878. </postconditions><postconditions><para>mark_count() == that.mark_count() </para>
  879. </postconditions><returns><para>*this </para>
  880. </returns></copy-assignment>
  881. <constructor><template>
  882. <template-type-parameter name="Expr"/>
  883. </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The static regular expression </para></description></parameter><description><para>Construct from a static regular expression.</para><para>
  884. </para></description><requires><para>Expr is the type of a static regular expression. </para>
  885. </requires><postconditions><para>regex_id() != 0 </para>
  886. </postconditions><postconditions><para>mark_count() &gt;= 0 </para>
  887. </postconditions></constructor>
  888. <copy-assignment><type><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</type><template>
  889. <template-type-parameter name="Expr"/>
  890. </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The static regular expression. </para></description></parameter><description><para>Construct from a static regular expression.</para><para>
  891. </para></description><requires><para>Expr is the type of a static regular expression. </para>
  892. </requires><postconditions><para>regex_id() != 0 </para>
  893. </postconditions><postconditions><para>mark_count() &gt;= 0 </para>
  894. </postconditions><returns><para>*this </para>
  895. </returns><throws><simpara><classname>std::bad_alloc</classname> on out of memory </simpara></throws></copy-assignment>
  896. <method-group name="public static functions">
  897. <method name="compile" specifiers="static"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><template>
  898. <template-type-parameter name="InputIter"/>
  899. </template><parameter name="begin"><paramtype>InputIter</paramtype><description><para>The beginning of a range of characters representing the regular expression to compile. </para></description></parameter><parameter name="end"><paramtype>InputIter</paramtype><description><para>The end of a range of characters representing the regular expression to compile. </para></description></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default><description><para>Optional bitmask that determines how the pat string is interpreted. (See syntax_option_type.) </para></description></parameter><description><para>Factory method for building a regex object from a range of characters. Equivalent to <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname>&lt; BidiIter &gt;().compile(begin, end, flags);</para><para>
  900. </para></description><requires><para>[begin,end) is a valid range. </para>
  901. </requires><requires><para>The range of characters specified by [begin,end) contains a valid string-based representation of a regular expression. </para>
  902. </requires><returns><para>A <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object corresponding to the regular expression represented by the character range. </para>
  903. </returns><throws><simpara><classname>regex_error</classname> when the range of characters has invalid regular expression syntax. </simpara></throws></method>
  904. <method name="compile" specifiers="static"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><template>
  905. <template-type-parameter name="InputRange"/>
  906. </template><parameter name="pat"><paramtype>InputRange const &amp;</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  907. <method name="compile" specifiers="static"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><parameter name="begin"><paramtype>char_type const *</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  908. <method name="compile" specifiers="static"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><parameter name="begin"><paramtype>char_type const *</paramtype></parameter><parameter name="len"><paramtype>std::size_t</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  909. </method-group>
  910. <method-group name="private member functions">
  911. </method-group>
  912. </struct><struct name="c_regex_traits"><template>
  913. <template-type-parameter name="Char"/>
  914. </template><purpose>Encapsaulates the standard C locale functions for use by the <computeroutput><classname alt="boost::xpressive::basic_regex">basic_regex</classname>&lt;&gt;</computeroutput> class template. </purpose><method-group name="public member functions">
  915. <method name="operator==" cv="const"><type>bool</type><parameter name=""><paramtype><classname>c_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname> objects for equality</para><para>
  916. </para></description><returns><para>true. </para>
  917. </returns></method>
  918. <method name="operator !=" cv="const"><type>bool</type><parameter name=""><paramtype><classname>c_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname> objects for inequality</para><para>
  919. </para></description><returns><para>false. </para>
  920. </returns></method>
  921. <method name="fold_case" cv="const"><type>string_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a <computeroutput>string_type</computeroutput> containing all the characters that compare equal disregrarding case to the one passed in. This function can only be called if <computeroutput><classname alt="boost::xpressive::has_fold_case">has_fold_case</classname>&lt;<classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname>&lt;Char&gt; &gt;::value</computeroutput> is <computeroutput>true</computeroutput>.</para><para>
  922. </para></description><returns><para><computeroutput>string_type</computeroutput> containing all chars which are equal to <computeroutput>ch</computeroutput> when disregarding case </para>
  923. </returns></method>
  924. <method name="imbue"><type>locale_type</type><parameter name="loc"><paramtype>locale_type</paramtype></parameter><description><para>No-op </para></description></method>
  925. </method-group>
  926. <constructor><parameter name="loc"><paramtype>locale_type const &amp;</paramtype><default>locale_type()</default></parameter><description><para>Initialize a <classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname> object to use the global C locale. </para></description></constructor>
  927. <method-group name="public static functions">
  928. <method name="widen" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char</paramtype><description><para>The source character. </para></description></parameter><description><para>Convert a char to a Char</para><para>
  929. </para></description><returns><para>ch if Char is char, std::btowc(ch) if Char is wchar_t. </para>
  930. </returns></method>
  931. <method name="hash" specifiers="static"><type>unsigned char</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a hash value for a Char in the range [0, UCHAR_MAX]</para><para>
  932. </para></description><returns><para>a value between 0 and UCHAR_MAX, inclusive. </para>
  933. </returns></method>
  934. <method name="translate" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>No-op</para><para>
  935. </para></description><returns><para>ch </para>
  936. </returns></method>
  937. <method name="translate_nocase" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to lower-case using the current global C locale.</para><para>
  938. </para></description><returns><para>std::tolower(ch) if Char is char, std::towlower(ch) if Char is wchar_t. </para>
  939. </returns></method>
  940. <method name="tolower" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to lower-case using the current global C locale.</para><para>
  941. </para></description><returns><para>std::tolower(ch) if Char is char, std::towlower(ch) if Char is wchar_t. </para>
  942. </returns></method>
  943. <method name="toupper" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to upper-case using the current global C locale.</para><para>
  944. </para></description><returns><para>std::toupper(ch) if Char is char, std::towupper(ch) if Char is wchar_t. </para>
  945. </returns></method>
  946. <method name="in_range" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range.</para><para>
  947. </para></description><returns><para>first &lt;= ch &amp;&amp; ch &lt;= last. </para>
  948. </returns></method>
  949. <method name="in_range_nocase" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range, irregardless of case.</para><para>
  950. <note><para>The default implementation doesn't do proper Unicode case folding, but this is the best we can do with the standard C locale functions. </para>
  951. </note>
  952. </para></description><returns><para>in_range(first, last, ch) || in_range(first, last, tolower(ch)) || in_range(first, last, toupper(ch)) </para>
  953. </returns></method>
  954. <method name="transform" specifiers="static"><type>string_type</type><template>
  955. <template-type-parameter name="FwdIter"/>
  956. </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) &lt; v.transform(H1, H2).</para><para><note><para>Not currently used </para>
  957. </note>
  958. </para></description></method>
  959. <method name="transform_primary" specifiers="static"><type>string_type</type><template>
  960. <template-type-parameter name="FwdIter"/>
  961. </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) &lt; v.transform_primary(H1, H2).</para><para><note><para>Not currently used </para>
  962. </note>
  963. </para></description></method>
  964. <method name="lookup_collatename" specifiers="static"><type>string_type</type><template>
  965. <template-type-parameter name="FwdIter"/>
  966. </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.</para><para><note><para>Not currently used </para>
  967. </note>
  968. </para></description></method>
  969. <method name="lookup_classname" specifiers="static"><type>char_class_type</type><template>
  970. <template-type-parameter name="FwdIter"/>
  971. </template><parameter name="begin"><paramtype>FwdIter</paramtype><description><para>A forward iterator to the start of the character sequence representing the name of the character class. </para></description></parameter><parameter name="end"><paramtype>FwdIter</paramtype><description><para>The end of the character sequence. </para></description></parameter><parameter name="icase"><paramtype>bool</paramtype><description><para>Specifies whether the returned bitmask should represent the case-insensitive version of the character class. </para></description></parameter><description><para>For the character class name represented by the specified character sequence, return the corresponding bitmask representation.</para><para>
  972. </para></description><returns><para>A bitmask representing the character class. </para>
  973. </returns></method>
  974. <method name="isctype" specifiers="static"><type>bool</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The character to test. </para></description></parameter><parameter name="mask"><paramtype>char_class_type</paramtype><description><para>The character class bitmask against which to test. </para></description></parameter><description><para>Tests a character against a character class bitmask.</para><para>
  975. </para></description><requires><para>mask is a bitmask returned by lookup_classname, or is several such masks bit-or'ed together. </para>
  976. </requires><returns><para>true if the character is a member of any of the specified character classes, false otherwise. </para>
  977. </returns></method>
  978. <method name="value" specifiers="static"><type>int</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The digit character. </para></description></parameter><parameter name="radix"><paramtype>int</paramtype><description><para>The radix to use for the conversion. </para></description></parameter><description><para>Convert a digit character into the integer it represents.</para><para>
  979. </para></description><requires><para>radix is one of 8, 10, or 16. </para>
  980. </requires><returns><para>-1 if ch is not a digit character, the integer value of the character otherwise. If char_type is char, std::strtol is used for the conversion. If char_type is wchar_t, std::wcstol is used. </para>
  981. </returns></method>
  982. <method name="getloc" specifiers="static"><type>locale_type</type><description><para>No-op </para></description></method>
  983. </method-group>
  984. </struct><struct name="compiler_traits"><template>
  985. <template-type-parameter name="RegexTraits"/>
  986. </template></struct><struct name="cpp_regex_traits"><template>
  987. <template-type-parameter name="Char"/>
  988. </template><purpose>Encapsaulates a <computeroutput>std::locale</computeroutput> for use by the <computeroutput><classname alt="boost::xpressive::basic_regex">basic_regex</classname>&lt;&gt;</computeroutput> class template. </purpose><method-group name="public member functions">
  989. <method name="operator==" cv="const"><type>bool</type><parameter name="that"><paramtype><classname>cpp_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname> objects for equality</para><para>
  990. </para></description><returns><para>this-&gt;getloc() == that.getloc(). </para>
  991. </returns></method>
  992. <method name="operator !=" cv="const"><type>bool</type><parameter name="that"><paramtype><classname>cpp_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname> objects for inequality</para><para>
  993. </para></description><returns><para>this-&gt;getloc() != that.getloc(). </para>
  994. </returns></method>
  995. <method name="widen" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char</paramtype><description><para>The source character. </para></description></parameter><description><para>Convert a char to a Char</para><para>
  996. </para></description><returns><para>std::use_facet&lt;std::ctype&lt;char_type&gt; &gt;(this-&gt;getloc()).widen(ch). </para>
  997. </returns></method>
  998. <method name="translate_nocase" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to lower-case using the internally-stored std::locale.</para><para>
  999. </para></description><returns><para>std::tolower(ch, this-&gt;getloc()). </para>
  1000. </returns></method>
  1001. <method name="tolower" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to lower-case using the internally-stored std::locale.</para><para>
  1002. </para></description><returns><para>std::tolower(ch, this-&gt;getloc()). </para>
  1003. </returns></method>
  1004. <method name="toupper" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Converts a character to upper-case using the internally-stored std::locale.</para><para>
  1005. </para></description><returns><para>std::toupper(ch, this-&gt;getloc()). </para>
  1006. </returns></method>
  1007. <method name="fold_case" cv="const"><type>string_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a <computeroutput>string_type</computeroutput> containing all the characters that compare equal disregrarding case to the one passed in. This function can only be called if <computeroutput><classname alt="boost::xpressive::has_fold_case">has_fold_case</classname>&lt;<classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname>&lt;Char&gt; &gt;::value</computeroutput> is <computeroutput>true</computeroutput>.</para><para>
  1008. </para></description><returns><para><computeroutput>string_type</computeroutput> containing all chars which are equal to <computeroutput>ch</computeroutput> when disregarding case </para>
  1009. </returns></method>
  1010. <method name="in_range_nocase" cv="const"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range, irregardless of case.</para><para>
  1011. <note><para>The default implementation doesn't do proper Unicode case folding, but this is the best we can do with the standard ctype facet. </para>
  1012. </note>
  1013. </para></description><returns><para>in_range(first, last, ch) || in_range(first, last, tolower(ch, this-&gt;getloc())) || in_range(first, last, toupper(ch, this-&gt;getloc())) </para>
  1014. </returns></method>
  1015. <method name="transform_primary" cv="const"><type>string_type</type><template>
  1016. <template-type-parameter name="FwdIter"/>
  1017. </template><parameter name=""><paramtype>FwdIter</paramtype></parameter><parameter name=""><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) &lt; v.transform_primary(H1, H2).</para><para><note><para>Not currently used </para>
  1018. </note>
  1019. </para></description></method>
  1020. <method name="lookup_collatename" cv="const"><type>string_type</type><template>
  1021. <template-type-parameter name="FwdIter"/>
  1022. </template><parameter name=""><paramtype>FwdIter</paramtype></parameter><parameter name=""><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.</para><para><note><para>Not currently used </para>
  1023. </note>
  1024. </para></description></method>
  1025. <method name="lookup_classname" cv="const"><type>char_class_type</type><template>
  1026. <template-type-parameter name="FwdIter"/>
  1027. </template><parameter name="begin"><paramtype>FwdIter</paramtype><description><para>A forward iterator to the start of the character sequence representing the name of the character class. </para></description></parameter><parameter name="end"><paramtype>FwdIter</paramtype><description><para>The end of the character sequence. </para></description></parameter><parameter name="icase"><paramtype>bool</paramtype><description><para>Specifies whether the returned bitmask should represent the case-insensitive version of the character class. </para></description></parameter><description><para>For the character class name represented by the specified character sequence, return the corresponding bitmask representation.</para><para>
  1028. </para></description><returns><para>A bitmask representing the character class. </para>
  1029. </returns></method>
  1030. <method name="isctype" cv="const"><type>bool</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The character to test. </para></description></parameter><parameter name="mask"><paramtype>char_class_type</paramtype><description><para>The character class bitmask against which to test. </para></description></parameter><description><para>Tests a character against a character class bitmask.</para><para>
  1031. </para></description><requires><para>mask is a bitmask returned by lookup_classname, or is several such masks bit-or'ed together. </para>
  1032. </requires><returns><para>true if the character is a member of any of the specified character classes, false otherwise. </para>
  1033. </returns></method>
  1034. <method name="value" cv="const"><type>int</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The digit character. </para></description></parameter><parameter name="radix"><paramtype>int</paramtype><description><para>The radix to use for the conversion. </para></description></parameter><description><para>Convert a digit character into the integer it represents.</para><para>
  1035. </para></description><requires><para>radix is one of 8, 10, or 16. </para>
  1036. </requires><returns><para>-1 if ch is not a digit character, the integer value of the character otherwise. The conversion is performed by imbueing a std::stringstream with this-&gt;getloc(); setting the radix to one of oct, hex or dec; inserting ch into the stream; and extracting an int. </para>
  1037. </returns></method>
  1038. <method name="imbue"><type>locale_type</type><parameter name="loc"><paramtype>locale_type</paramtype><description><para>A std::locale. </para></description></parameter><description><para>Imbues *this with loc</para><para>
  1039. </para></description><returns><para>the previous std::locale used by *this. </para>
  1040. </returns></method>
  1041. <method name="getloc" cv="const"><type>locale_type</type><description><para>Returns the current std::locale used by *this. </para></description></method>
  1042. <method name="hash"><type>unsigned char</type><template>
  1043. </template><parameter name="ch"><paramtype>unsigned char</paramtype></parameter></method>
  1044. <method name="hash"><type>unsigned char</type><template>
  1045. </template><parameter name="ch"><paramtype>char</paramtype></parameter></method>
  1046. <method name="hash"><type>unsigned char</type><template>
  1047. </template><parameter name="ch"><paramtype>signed char</paramtype></parameter></method>
  1048. <method name="hash"><type>unsigned char</type><template>
  1049. </template><parameter name="ch"><paramtype>wchar_t</paramtype></parameter></method>
  1050. </method-group>
  1051. <constructor><parameter name="loc"><paramtype>locale_type const &amp;</paramtype><default>locale_type()</default></parameter><description><para>Initialize a <classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname> object to use the specified std::locale, or the global std::locale if none is specified. </para></description></constructor>
  1052. <method-group name="public static functions">
  1053. <method name="hash" specifiers="static"><type>unsigned char</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a hash value for a Char in the range [0, UCHAR_MAX]</para><para>
  1054. </para></description><returns><para>a value between 0 and UCHAR_MAX, inclusive. </para>
  1055. </returns></method>
  1056. <method name="translate" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>No-op</para><para>
  1057. </para></description><returns><para>ch </para>
  1058. </returns></method>
  1059. <method name="in_range" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range.</para><para>
  1060. </para></description><returns><para>first &lt;= ch &amp;&amp; ch &lt;= last. </para>
  1061. </returns></method>
  1062. </method-group>
  1063. <method-group name="private static functions">
  1064. </method-group>
  1065. </struct><struct name="has_fold_case"><template>
  1066. <template-type-parameter name="Traits"/>
  1067. </template><inherit access="public">is_convertible&lt; Traits::version_tag *, regex_traits_version_1_case_fold_tag * &gt;</inherit><purpose>Trait used to denote that a traits class has the fold_case member function. </purpose></struct><struct name="local"><template>
  1068. <template-type-parameter name="T"><purpose><para>The type of the local variable.</para></purpose></template-type-parameter>
  1069. </template><inherit access="public">proto::terminal::type&lt; reference_wrapper&lt; T &gt; &gt;</inherit><purpose><computeroutput>local&lt;&gt;</computeroutput> is a lazy wrapper for a reference to a value that is stored within the local itself. It is for use within xpressive semantic actions. </purpose><description><para>
  1070. Below is an example of how to use <computeroutput>local&lt;&gt;</computeroutput> in semantic actions.<programlisting language="c++">using namespace boost::xpressive;
  1071. local&lt;int&gt; i(0);
  1072. std::string str("1!2!3?");
  1073. // count the exciting digits, but not the
  1074. // questionable ones.
  1075. sregex rex = +( _d [ ++i ] &gt;&gt; '!' );
  1076. regex_search(str, rex);
  1077. assert( i.get() == 2 );
  1078. </programlisting><note><para>As the name "local" suggests, <computeroutput>local&lt;&gt;</computeroutput> objects and the regexes that refer to them should never leave the local scope. The value stored within the local object will be destroyed at the end of the <computeroutput>local&lt;&gt;'s</computeroutput> lifetime, and any regex objects still holding the <computeroutput>local&lt;&gt;</computeroutput> will be left with a dangling reference. </para>
  1079. </note>
  1080. </para></description><method-group name="public member functions">
  1081. <method name="get"><type>T &amp;</type><purpose>Fetch the wrapped value. </purpose></method>
  1082. <method name="get" cv="const"><type>T const &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1083. </method-group>
  1084. <constructor><purpose>Store a default-constructed value of type <computeroutput>T</computeroutput>. </purpose></constructor>
  1085. <constructor specifiers="explicit"><parameter name="t"><paramtype>T const &amp;</paramtype><description><para>The initial value. </para></description></parameter><purpose>Store a default-constructed value of type <computeroutput>T</computeroutput>. </purpose><description><para>
  1086. </para></description></constructor>
  1087. </struct><struct name="match_results"><template>
  1088. <template-type-parameter name="BidiIter"/>
  1089. </template><purpose>Class template <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt; holds the results of a regex_match() or a regex_search() as a collection of <classname alt="boost::xpressive::sub_match">sub_match</classname> objects. </purpose><description><para>Class template <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt; denotes a collection of sequences representing the result of a regular expression match. Storage for the collection is allocated and freed as necessary by the member functions of class <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt;.</para><para>The class template <classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt; conforms to the requirements of a Sequence, as specified in (lib.sequence.reqmts), except that only operations defined for const-qualified Sequences are supported. </para></description><method-group name="public member functions">
  1090. <method name="size" cv="const"><type>size_type</type><description><para>Returns one plus the number of marked sub-expressions in the regular expression that was matched if *this represents the result of a successful match. Otherwise returns 0. </para></description></method>
  1091. <method name="empty" cv="const"><type>bool</type><description><para>Returns size() == 0. </para></description></method>
  1092. <method name="length" cv="const"><type>difference_type</type><parameter name="sub"><paramtype>size_type</paramtype><default>0</default></parameter><description><para>Returns (*this)[sub].length(). </para></description></method>
  1093. <method name="position" cv="const"><type>difference_type</type><parameter name="sub"><paramtype>size_type</paramtype><default>0</default></parameter><description><para>If !(*this)[sub].matched then returns -1. Otherwise returns std::distance(base, (*this)[sub].first), where base is the start iterator of the sequence that was searched. [Note - unless this is part of a repeated search with a <classname alt="boost::xpressive::regex_iterator">regex_iterator</classname> then base is the same as prefix().first - end note] </para></description></method>
  1094. <method name="str" cv="const"><type>string_type</type><parameter name="sub"><paramtype>size_type</paramtype><default>0</default></parameter><description><para>Returns (*this)[sub].str(). </para></description></method>
  1095. <method name="operator []" cv="const"><type>const_reference</type><template>
  1096. <template-type-parameter name="Sub"/>
  1097. </template><parameter name="sub"><paramtype>Sub const &amp;</paramtype></parameter><description><para>Returns a reference to the <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing the sequence that matched marked sub-expression sub. If sub == 0 then returns a reference to a <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing the sequence that matched the whole regular expression. If sub &gt;= size() then returns a <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing an unmatched sub-expression. </para></description></method>
  1098. <method name="prefix" cv="const"><type>const_reference</type><description><para>Returns a reference to the <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing the character sequence from the start of the string being matched/searched, to the start of the match found.</para><para>
  1099. </para></description><requires><para>(*this)[0].matched is true </para>
  1100. </requires></method>
  1101. <method name="suffix" cv="const"><type>const_reference</type><description><para>Returns a reference to the <classname alt="boost::xpressive::sub_match">sub_match</classname> object representing the character sequence from the end of the match found to the end of the string being matched/searched.</para><para>
  1102. </para></description><requires><para>(*this)[0].matched is true </para>
  1103. </requires></method>
  1104. <method name="begin" cv="const"><type>const_iterator</type><description><para>Returns a starting iterator that enumerates over all the marked sub-expression matches stored in *this. </para></description></method>
  1105. <method name="end" cv="const"><type>const_iterator</type><description><para>Returns a terminating iterator that enumerates over all the marked sub-expression matches stored in *this. </para></description></method>
  1106. <method name="conversion-operator" cv="const"><type>bool_type</type><description><para>Returns a true value if (*this)[0].matched, else returns a false value. </para></description></method>
  1107. <method name="operator !" cv="const"><type>bool</type><description><para>Returns true if empty() || !(*this)[0].matched, else returns false. </para></description></method>
  1108. <method name="regex_id" cv="const"><type>regex_id_type</type><description><para>Returns the id of the <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object most recently used with this <classname alt="boost::xpressive::match_results">match_results</classname> object. </para></description></method>
  1109. <method name="nested_results" cv="const"><type>nested_results_type const &amp;</type><description><para>Returns a Sequence of nested <classname alt="boost::xpressive::match_results">match_results</classname> elements. </para></description></method>
  1110. <method name="format" cv="const"><type>OutputIterator</type><template>
  1111. <template-type-parameter name="Format"/>
  1112. <template-type-parameter name="OutputIterator"/>
  1113. </template><parameter name="out"><paramtype>OutputIterator</paramtype></parameter><parameter name="fmt"><paramtype>Format const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::format_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter><description><para>If <computeroutput>Format</computeroutput> models <computeroutput>ForwardRange</computeroutput> or is a null-terminated string, this function copies the character sequence in <computeroutput>fmt</computeroutput> to <computeroutput>OutputIterator</computeroutput> <computeroutput>out</computeroutput>. For each format specifier or escape sequence in <computeroutput>fmt</computeroutput>, replace that sequence with either the character(s) it represents, or the sequence within <computeroutput>*this</computeroutput> to which it refers. The bitmasks specified in flags determines what format specifiers or escape sequences are recognized. By default, this is the format used by ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutputIterator, regex_constants::match_flag_type&gt;</computeroutput>, this function returns <computeroutput>fmt(*this, out, flags)</computeroutput>.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutputIterator&gt;</computeroutput>, this function returns <computeroutput>fmt(*this, out)</computeroutput>.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt; &gt;</computeroutput>, this function returns <computeroutput>std::copy(x.begin(), x.end(), out)</computeroutput>, where <computeroutput>x</computeroutput> is the result of calling <computeroutput>fmt(*this)</computeroutput>. </para></description></method>
  1114. <method name="format" cv="const"><type>OutputIterator</type><template>
  1115. <template-type-parameter name="OutputIterator"/>
  1116. </template><parameter name="out"><paramtype>OutputIterator</paramtype></parameter><parameter name="fmt"><paramtype>char_type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::format_default</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1117. <method name="format" cv="const"><type>string_type</type><template>
  1118. <template-type-parameter name="Format"/>
  1119. <template-type-parameter name="OutputIterator"/>
  1120. </template><parameter name="fmt"><paramtype>Format const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::format_default</default></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter><description><para>If <computeroutput>Format</computeroutput> models <computeroutput>ForwardRange</computeroutput> or is a null-terminated string, this function returns a copy of the character sequence <computeroutput>fmt</computeroutput>. For each format specifier or escape sequence in <computeroutput>fmt</computeroutput>, replace that sequence with either the character(s) it represents, or the sequence within <computeroutput>*this</computeroutput> to which it refers. The bitmasks specified in <computeroutput>flags</computeroutput> determines what format specifiers or escape sequences are recognized. By default this is the format used by ECMA-262, ECMAScript Language Specification, Chapter 15 part 5.4.11 String.prototype.replace.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutputIterator, regex_constants::match_flag_type&gt;</computeroutput>, this function returns a <computeroutput>string_type</computeroutput> object <computeroutput>x</computeroutput> populated by calling <computeroutput>fmt(*this, out, flags)</computeroutput>, where <computeroutput>out</computeroutput> is a <computeroutput>back_insert_iterator</computeroutput> into <computeroutput>x</computeroutput>.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt;, OutputIterator&gt;</computeroutput>, this function returns a <computeroutput>string_type</computeroutput> object <computeroutput>x</computeroutput> populated by calling <computeroutput>fmt(*this, out)</computeroutput>, where <computeroutput>out</computeroutput> is a <computeroutput>back_insert_iterator</computeroutput> into <computeroutput>x</computeroutput>.</para><para>Otherwise, if <computeroutput>Format</computeroutput> models <computeroutput>Callable&lt;<classname alt="boost::xpressive::match_results">match_results</classname>&lt;BidiIter&gt; &gt;</computeroutput>, this function returns <computeroutput>fmt(*this)</computeroutput>. </para></description></method>
  1121. <method name="format" cv="const"><type>string_type</type><parameter name="fmt"><paramtype>char_type const *</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::format_default</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1122. <method name="swap"><type>void</type><parameter name="that"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; &amp;</paramtype><description><para>The <classname alt="boost::xpressive::match_results">match_results</classname> object to swap with. </para></description></parameter><description><para>Swaps the contents of two <classname alt="boost::xpressive::match_results">match_results</classname> objects. Guaranteed not to throw.
  1123. </para></description><postconditions><para>*this contains the sequence of matched sub-expressions that were in that, that contains the sequence of matched sub-expressions that were in *this. </para>
  1124. </postconditions><throws><simpara>Will not throw.</simpara></throws></method>
  1125. <method name="let"><type><classname>match_results</classname>&lt; BidiIter &gt; &amp;</type><template>
  1126. <template-type-parameter name="Arg"/>
  1127. </template><parameter name="arg"><paramtype>Arg const &amp;</paramtype></parameter><description><para>TODO document me </para></description></method>
  1128. </method-group>
  1129. <constructor><description><para>
  1130. </para></description><postconditions><para>regex_id() == 0 </para>
  1131. </postconditions><postconditions><para>size() == 0 </para>
  1132. </postconditions><postconditions><para>empty() == true </para>
  1133. </postconditions><postconditions><para>str() == string_type() </para>
  1134. </postconditions></constructor>
  1135. <constructor><parameter name="that"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::match_results">match_results</classname> object to copy </para></description></parameter><description><para>
  1136. </para></description><postconditions><para>regex_id() == that.regex_id(). </para>
  1137. </postconditions><postconditions><para>size() == that.size(). </para>
  1138. </postconditions><postconditions><para>empty() == that.empty(). </para>
  1139. </postconditions><postconditions><para>str(n) == that.str(n) for all positive integers n &lt; that.size(). </para>
  1140. </postconditions><postconditions><para>prefix() == that.prefix(). </para>
  1141. </postconditions><postconditions><para>suffix() == that.suffix(). </para>
  1142. </postconditions><postconditions><para>(*this)[n] == that[n] for all positive integers n &lt; that.size(). </para>
  1143. </postconditions><postconditions><para>length(n) == that.length(n) for all positive integers n &lt; that.size(). </para>
  1144. </postconditions><postconditions><para>position(n) == that.position(n) for all positive integers n &lt; that.size(). </para>
  1145. </postconditions></constructor>
  1146. <destructor/>
  1147. <copy-assignment><type><classname>match_results</classname>&lt; BidiIter &gt; &amp;</type><parameter name="that"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The <classname alt="boost::xpressive::match_results">match_results</classname> object to copy. </para></description></parameter><description><para>
  1148. </para></description><postconditions><para>regex_id() == that.regex_id(). </para>
  1149. </postconditions><postconditions><para>size() == that.size(). </para>
  1150. </postconditions><postconditions><para>empty() == that.empty(). </para>
  1151. </postconditions><postconditions><para>str(n) == that.str(n) for all positive integers n &lt; that.size(). </para>
  1152. </postconditions><postconditions><para>prefix() == that.prefix(). </para>
  1153. </postconditions><postconditions><para>suffix() == that.suffix(). </para>
  1154. </postconditions><postconditions><para>(*this)[n] == that[n] for all positive integers n &lt; that.size(). </para>
  1155. </postconditions><postconditions><para>length(n) == that.length(n) for all positive integers n &lt; that.size(). </para>
  1156. </postconditions><postconditions><para>position(n) == that.position(n) for all positive integers n &lt; that.size(). </para>
  1157. </postconditions></copy-assignment>
  1158. </struct><struct name="null_regex_traits"><template>
  1159. <template-type-parameter name="Elem"/>
  1160. </template><purpose>stub <classname alt="boost::xpressive::regex_traits">regex_traits</classname> for non-char data </purpose><method-group name="public member functions">
  1161. <method name="operator==" cv="const"><type>bool</type><parameter name="that"><paramtype><classname>null_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> objects for equality</para><para>
  1162. </para></description><returns><para>true. </para>
  1163. </returns></method>
  1164. <method name="operator !=" cv="const"><type>bool</type><parameter name="that"><paramtype><classname>null_regex_traits</classname>&lt; char_type &gt; const &amp;</paramtype></parameter><description><para>Checks two <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> objects for inequality</para><para>
  1165. </para></description><returns><para>false. </para>
  1166. </returns></method>
  1167. <method name="widen" cv="const"><type>char_type</type><parameter name="ch"><paramtype>char</paramtype><description><para>The source character. </para></description></parameter><description><para>Convert a char to a Elem</para><para>
  1168. </para></description><returns><para>Elem(ch). </para>
  1169. </returns></method>
  1170. </method-group>
  1171. <constructor><parameter name=""><paramtype>locale_type</paramtype><default>locale_type()</default></parameter><description><para>Initialize a <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> object. </para></description></constructor>
  1172. <method-group name="public static functions">
  1173. <method name="hash" specifiers="static"><type>unsigned char</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Returns a hash value for a Elem in the range [0, UCHAR_MAX]</para><para>
  1174. </para></description><returns><para>a value between 0 and UCHAR_MAX, inclusive. </para>
  1175. </returns></method>
  1176. <method name="translate" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>No-op</para><para>
  1177. </para></description><returns><para>ch </para>
  1178. </returns></method>
  1179. <method name="translate_nocase" specifiers="static"><type>char_type</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>No-op</para><para>
  1180. </para></description><returns><para>ch </para>
  1181. </returns></method>
  1182. <method name="in_range" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range.</para><para>
  1183. </para></description><returns><para>first &lt;= ch &amp;&amp; ch &lt;= last. </para>
  1184. </returns></method>
  1185. <method name="in_range_nocase" specifiers="static"><type>bool</type><parameter name="first"><paramtype>char_type</paramtype><description><para>The bottom of the range, inclusive. </para></description></parameter><parameter name="last"><paramtype>char_type</paramtype><description><para>The top of the range, inclusive. </para></description></parameter><parameter name="ch"><paramtype>char_type</paramtype><description><para>The source character. </para></description></parameter><description><para>Checks to see if a character is within a character range.</para><para>
  1186. <note><para>Since the <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> does not do case-folding, this function is equivalent to in_range(). </para>
  1187. </note>
  1188. </para></description><returns><para>first &lt;= ch &amp;&amp; ch &lt;= last. </para>
  1189. </returns></method>
  1190. <method name="transform" specifiers="static"><type>string_type</type><template>
  1191. <template-type-parameter name="FwdIter"/>
  1192. </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) &lt; v.transform(H1, H2).</para><para><note><para>Not currently used </para>
  1193. </note>
  1194. </para></description></method>
  1195. <method name="transform_primary" specifiers="static"><type>string_type</type><template>
  1196. <template-type-parameter name="FwdIter"/>
  1197. </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) when character case is not considered then v.transform_primary(G1, G2) &lt; v.transform_primary(H1, H2).</para><para><note><para>Not currently used </para>
  1198. </note>
  1199. </para></description></method>
  1200. <method name="lookup_collatename" specifiers="static"><type>string_type</type><template>
  1201. <template-type-parameter name="FwdIter"/>
  1202. </template><parameter name="begin"><paramtype>FwdIter</paramtype></parameter><parameter name="end"><paramtype>FwdIter</paramtype></parameter><description><para>Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.</para><para><note><para>Not currently used </para>
  1203. </note>
  1204. </para></description></method>
  1205. <method name="lookup_classname" specifiers="static"><type>char_class_type</type><template>
  1206. <template-type-parameter name="FwdIter"/>
  1207. </template><parameter name="begin"><paramtype>FwdIter</paramtype><description><para>not used </para></description></parameter><parameter name="end"><paramtype>FwdIter</paramtype><description><para>not used </para></description></parameter><parameter name="icase"><paramtype>bool</paramtype><description><para>not used </para></description></parameter><description><para>The <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> does not have character classifications, so lookup_classname() is unused.</para><para>
  1208. </para></description><returns><para>static_cast&lt;char_class_type&gt;(0) </para>
  1209. </returns></method>
  1210. <method name="isctype" specifiers="static"><type>bool</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>not used </para></description></parameter><parameter name="mask"><paramtype>char_class_type</paramtype><description><para>not used </para></description></parameter><description><para>The <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> does not have character classifications, so isctype() is unused.</para><para>
  1211. </para></description><returns><para>false </para>
  1212. </returns></method>
  1213. <method name="value" specifiers="static"><type>int</type><parameter name="ch"><paramtype>char_type</paramtype><description><para>not used </para></description></parameter><parameter name="radix"><paramtype>int</paramtype><description><para>not used </para></description></parameter><description><para>The <classname alt="boost::xpressive::null_regex_traits">null_regex_traits</classname> recognizes no elements as digits, so value() is unused.</para><para>
  1214. </para></description><returns><para>-1 </para>
  1215. </returns></method>
  1216. <method name="imbue" specifiers="static"><type>locale_type</type><parameter name="loc"><paramtype>locale_type</paramtype><description><para>not used </para></description></parameter><description><para>Not used</para><para>
  1217. </para></description><returns><para>loc </para>
  1218. </returns></method>
  1219. <method name="getloc" specifiers="static"><type>locale_type</type><description><para>Returns locale_type().</para><para>
  1220. </para></description><returns><para>locale_type() </para>
  1221. </returns></method>
  1222. </method-group>
  1223. </struct><struct name="placeholder"><template>
  1224. <template-type-parameter name="T"><purpose><para>The type of the object for which this placeholder stands in. </para></purpose></template-type-parameter>
  1225. <template-nontype-parameter name="I"><type>int</type><default>0</default><purpose><para>An optional identifier that can be used to distinguish this placeholder from others that may be used in the same semantic action that happen to have the same type.</para></purpose></template-nontype-parameter>
  1226. </template><purpose>For defining a placeholder to stand in for a variable a semantic action. </purpose><description><para>Use <computeroutput>placeholder&lt;&gt;</computeroutput> to define a placeholder for use in semantic actions to stand in for real objects. The use of placeholders allows regular expressions with actions to be defined once and reused in many contexts to read and write from objects which were not available when the regex was defined.</para><para>
  1227. You can use <computeroutput>placeholder&lt;&gt;</computeroutput> by creating an object of type <computeroutput>placeholder&lt;T&gt;</computeroutput> and using that object in a semantic action exactly as you intend an object of type <computeroutput>T</computeroutput> to be used.<programlisting language="c++">placeholder&lt;int&gt; _i;
  1228. placeholder&lt;double&gt; _d;
  1229. sregex rex = ( some &gt;&gt; regex &gt;&gt; here )
  1230. [ ++_i, _d *= _d ];
  1231. </programlisting>Then, when doing a pattern match with either <computeroutput>regex_search()</computeroutput>, <computeroutput>regex_match()</computeroutput> or <computeroutput>regex_replace()</computeroutput>, pass a <computeroutput><classname alt="boost::xpressive::match_results">match_results</classname>&lt;&gt;</computeroutput> object that contains bindings for the placeholders used in the regex object's semantic actions. You can create the bindings by calling <computeroutput>match_results::let</computeroutput> as follows:<programlisting language="c++">int i = 0;
  1232. double d = 3.14;
  1233. smatch what;
  1234. what.let(_i = i)
  1235. .let(_d = d);
  1236. if(regex_match("some string", rex, what))
  1237. // i and d mutated here
  1238. </programlisting>If a semantic action executes that contains an unbound placeholder, a exception of type <computeroutput><classname alt="boost::xpressive::regex_error">regex_error</classname></computeroutput> is thrown.</para><para>See the discussion for <computeroutput>xpressive::let()</computeroutput> and the <link linkend="boost_xpressive.user_s_guide.semantic_actions_and_user_defined_assertions.referring_to_non_local_variables"> "Referring to Non-Local Variables"</link> section in the Users' Guide for more information.</para><para><emphasis>Example:</emphasis><programlisting language="c++">// Define a placeholder for a map object:
  1239. placeholder&lt;std::map&lt;std::string, int&gt; &gt; _map;
  1240. // Match a word and an integer, separated by =&gt;,
  1241. // and then stuff the result into a std::map&lt;&gt;
  1242. sregex pair = ( (s1= +_w) &gt;&gt; "=&gt;" &gt;&gt; (s2= +_d) )
  1243. [ _map[s1] = as&lt;int&gt;(s2) ];
  1244. // Match one or more word/integer pairs, separated
  1245. // by whitespace.
  1246. sregex rx = pair &gt;&gt; *(+_s &gt;&gt; pair);
  1247. // The string to parse
  1248. std::string str("aaa=&gt;1 bbb=&gt;23 ccc=&gt;456");
  1249. // Here is the actual map to fill in:
  1250. std::map&lt;std::string, int&gt; result;
  1251. // Bind the _map placeholder to the actual map
  1252. smatch what;
  1253. what.let( _map = result );
  1254. // Execute the match and fill in result map
  1255. if(regex_match(str, what, rx))
  1256. {
  1257. std::cout &lt;&lt; result["aaa"] &lt;&lt; '\n';
  1258. std::cout &lt;&lt; result["bbb"] &lt;&lt; '\n';
  1259. std::cout &lt;&lt; result["ccc"] &lt;&lt; '\n';
  1260. }
  1261. </programlisting> </para></description><method-group name="public member functions">
  1262. </method-group>
  1263. <copy-assignment cv="const"><type><emphasis>unspecified</emphasis></type><parameter name="t"><paramtype>T &amp;</paramtype><description><para>The object to associate with this placeholder </para></description></parameter><description><para>
  1264. </para></description><returns><para>An object of unspecified type that records the association of <computeroutput>t</computeroutput> with <computeroutput>*this</computeroutput>. </para>
  1265. </returns></copy-assignment>
  1266. <copy-assignment cv="const"><type><emphasis>unspecified</emphasis></type><parameter name="t"><paramtype>T const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment>
  1267. </struct><struct name="reference"><template>
  1268. <template-type-parameter name="T"><purpose><para>The type of the referent.</para></purpose></template-type-parameter>
  1269. </template><inherit access="public">proto::extends&lt; proto::terminal&lt; reference_wrapper&lt; T &gt; &gt;::type, reference&lt; T &gt; &gt;</inherit><purpose><computeroutput>reference&lt;&gt;</computeroutput> is a lazy wrapper for a reference that can be used in xpressive semantic actions. </purpose><description><para>
  1270. Here is an example of how to use <computeroutput>reference&lt;&gt;</computeroutput> to create a lazy reference to an existing object so it can be read and written in an xpressive semantic action.<programlisting language="c++">using namespace boost::xpressive;
  1271. std::map&lt;std::string, int&gt; result;
  1272. reference&lt;std::map&lt;std::string, int&gt; &gt; result_ref(result);
  1273. // Match a word and an integer, separated by =&gt;,
  1274. // and then stuff the result into a std::map&lt;&gt;
  1275. sregex pair = ( (s1= +_w) &gt;&gt; "=&gt;" &gt;&gt; (s2= +_d) )
  1276. [ result_ref[s1] = as&lt;int&gt;(s2) ];
  1277. </programlisting> </para></description><method-group name="public member functions">
  1278. <method name="get" cv="const"><type>T &amp;</type><purpose>Fetch the stored value. </purpose></method>
  1279. </method-group>
  1280. <constructor specifiers="explicit"><parameter name="t"><paramtype>T &amp;</paramtype><description><para>Reference to object </para></description></parameter><purpose>Store a reference to <computeroutput>t</computeroutput>. </purpose><description><para>
  1281. </para></description></constructor>
  1282. </struct><struct name="regex_compiler"><template>
  1283. <template-type-parameter name="BidiIter"/>
  1284. <template-type-parameter name="RegexTraits"/>
  1285. <template-type-parameter name="CompilerTraits"/>
  1286. </template><purpose>Class template <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> is a factory for building <classname alt="boost::xpressive::basic_regex">basic_regex</classname> objects from a string. </purpose><description><para>Class template <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> is used to construct a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object from a string. The string should contain a valid regular expression. You can imbue a <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> object with a locale, after which all <classname alt="boost::xpressive::basic_regex">basic_regex</classname> objects created with that <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> object will use that locale. After creating a <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> object, and optionally imbueing it with a locale, you can call the compile() method to construct a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object, passing it the string representing the regular expression. You can call compile() multiple times on the same <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> object. Two <classname alt="boost::xpressive::basic_regex">basic_regex</classname> objects compiled from the same string will have different regex_id's. </para></description><method-group name="public member functions">
  1287. <method name="imbue"><type>locale_type</type><parameter name="loc"><paramtype>locale_type</paramtype><description><para>The locale that this <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname> should use. </para></description></parameter><description><para>Specify the locale to be used by a <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname>.</para><para>
  1288. </para></description><returns><para>The previous locale. </para>
  1289. </returns></method>
  1290. <method name="getloc" cv="const"><type>locale_type</type><description><para>Get the locale used by a <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname>.</para><para>
  1291. </para></description><returns><para>The locale used by this <classname alt="boost::xpressive::regex_compiler">regex_compiler</classname>. </para>
  1292. </returns></method>
  1293. <method name="compile"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><template>
  1294. <template-type-parameter name="InputIter"/>
  1295. </template><parameter name="begin"><paramtype>InputIter</paramtype><description><para>The beginning of a range of characters representing the regular expression to compile. </para></description></parameter><parameter name="end"><paramtype>InputIter</paramtype><description><para>The end of a range of characters representing the regular expression to compile. </para></description></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default><description><para>Optional bitmask that determines how the pat string is interpreted. (See syntax_option_type.) </para></description></parameter><description><para>Builds a <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object from a range of characters.</para><para>
  1296. </para></description><requires><para>InputIter is a model of the InputIterator concept. </para>
  1297. </requires><requires><para>[begin,end) is a valid range. </para>
  1298. </requires><requires><para>The range of characters specified by [begin,end) contains a valid string-based representation of a regular expression. </para>
  1299. </requires><returns><para>A <classname alt="boost::xpressive::basic_regex">basic_regex</classname> object corresponding to the regular expression represented by the character range. </para>
  1300. </returns><throws><simpara><classname>regex_error</classname> when the range of characters has invalid regular expression syntax. </simpara></throws></method>
  1301. <method name="compile"><type>disable_if&lt; is_pointer&lt; InputRange &gt;, <classname>basic_regex</classname>&lt; BidiIter &gt; &gt;::type</type><template>
  1302. <template-type-parameter name="InputRange"/>
  1303. </template><parameter name="pat"><paramtype>InputRange const &amp;</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1304. <method name="compile"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><parameter name="begin"><paramtype>char_type const *</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype><default>regex_constants::ECMAScript</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1305. <method name="compile"><type><classname>basic_regex</classname>&lt; BidiIter &gt;</type><parameter name="begin"><paramtype>char_type const *</paramtype></parameter><parameter name="size"><paramtype>std::size_t</paramtype></parameter><parameter name="flags"><paramtype>flag_type</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1306. <method name="operator []"><type><classname>basic_regex</classname>&lt; BidiIter &gt; &amp;</type><parameter name="name"><paramtype>string_type const &amp;</paramtype><description><para>A std::string containing the name of the regular expression. </para></description></parameter><description><para>Return a reference to the named regular expression. If no such named regular expression exists, create a new regular expression and return a reference to it.</para><para>
  1307. </para></description><requires><para>The string is not empty. </para>
  1308. </requires><throws><simpara><classname>bad_alloc</classname> on allocation failure. </simpara></throws></method>
  1309. <method name="operator []" cv="const"><type><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</type><parameter name="name"><paramtype>string_type const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1310. </method-group>
  1311. <constructor specifiers="explicit"><parameter name="traits"><paramtype>RegexTraits const &amp;</paramtype><default>RegexTraits()</default></parameter></constructor>
  1312. <method-group name="private member functions">
  1313. <method name="is_upper_" cv="const"><type>bool</type><parameter name="ch"><paramtype>char_type</paramtype></parameter></method>
  1314. </method-group>
  1315. </struct><struct name="regex_id_filter_predicate"><template>
  1316. <template-type-parameter name="BidiIter"/>
  1317. </template><method-group name="public member functions">
  1318. <method name="operator()" cv="const"><type>bool</type><parameter name="res"><paramtype><classname>match_results</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></method>
  1319. </method-group>
  1320. <constructor><parameter name="regex_id"><paramtype>regex_id_type</paramtype></parameter></constructor>
  1321. </struct><struct name="regex_iterator"><template>
  1322. <template-type-parameter name="BidiIter"/>
  1323. </template><method-group name="public member functions">
  1324. <method name="operator *" cv="const"><type>value_type const &amp;</type></method>
  1325. <method name="operator -&gt;" cv="const"><type>value_type const *</type></method>
  1326. <method name="operator++"><type><classname>regex_iterator</classname>&lt; BidiIter &gt; &amp;</type><description><para>If what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then behaves as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If no further match is found then sets *this equal to the end of sequence iterator.
  1327. </para></description><postconditions><para>(*this)-&gt;size() == pre-&gt;mark_count() + 1 </para>
  1328. </postconditions><postconditions><para>(*this)-&gt;empty() == false </para>
  1329. </postconditions><postconditions><para>(*this)-&gt;prefix().first == An iterator denoting the end point of the previous match found </para>
  1330. </postconditions><postconditions><para>(*this)-&gt;prefix().last == (**this)[0].first </para>
  1331. </postconditions><postconditions><para>(*this)-&gt;prefix().matched == (*this)-&gt;prefix().first != (*this)-&gt;prefix().second </para>
  1332. </postconditions><postconditions><para>(*this)-&gt;suffix().first == (**this)[0].second </para>
  1333. </postconditions><postconditions><para>(*this)-&gt;suffix().last == end </para>
  1334. </postconditions><postconditions><para>(*this)-&gt;suffix().matched == (*this)-&gt;suffix().first != (*this)-&gt;suffix().second </para>
  1335. </postconditions><postconditions><para>(**this)[0].first == The starting iterator for this match. </para>
  1336. </postconditions><postconditions><para>(**this)[0].second == The ending iterator for this match. </para>
  1337. </postconditions><postconditions><para>(**this)[0].matched == true if a full match was found, and false if it was a partial match (found as a result of the match_partial flag being set). </para>
  1338. </postconditions><postconditions><para>(**this)[n].first == For all integers n &lt; (*this)-&gt;size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end. </para>
  1339. </postconditions><postconditions><para>(**this)[n].second == For all integers n &lt; (*this)-&gt;size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end. </para>
  1340. </postconditions><postconditions><para>(**this)[n].matched == For all integers n &lt; (*this)-&gt;size(), true if sub-expression n participated in the match, false otherwise. </para>
  1341. </postconditions><postconditions><para>(*this)-&gt;position() == The distance from the start of the original sequence being iterated, to the start of this match. </para>
  1342. </postconditions></method>
  1343. <method name="operator++"><type><classname>regex_iterator</classname>&lt; BidiIter &gt;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
  1344. </method-group>
  1345. <constructor/>
  1346. <constructor><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></constructor>
  1347. <constructor><template>
  1348. <template-type-parameter name="LetExpr"/>
  1349. </template><parameter name="begin"><paramtype>BidiIter</paramtype></parameter><parameter name="end"><paramtype>BidiIter</paramtype></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><parameter name="args"><paramtype><emphasis>unspecified</emphasis></paramtype></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default></parameter></constructor>
  1350. <constructor><parameter name="that"><paramtype><classname>regex_iterator</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></constructor>
  1351. <copy-assignment><type><classname>regex_iterator</classname>&lt; BidiIter &gt; &amp;</type><parameter name="that"><paramtype><classname>regex_iterator</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter></copy-assignment>
  1352. <method-group name="private member functions">
  1353. </method-group>
  1354. </struct><struct name="regex_token_iterator"><template>
  1355. <template-type-parameter name="BidiIter"/>
  1356. </template><method-group name="public member functions">
  1357. <method name="operator *" cv="const"><type>value_type const &amp;</type></method>
  1358. <method name="operator -&gt;" cv="const"><type>value_type const *</type></method>
  1359. <method name="operator++"><type><classname>regex_token_iterator</classname>&lt; BidiIter &gt; &amp;</type><description><para>If N == -1 then sets *this equal to the end of sequence iterator. Otherwise if N+1 &lt; subs.size(), then increments N and sets result equal to ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[subs[N]].str())). Otherwise if what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then locates the next match as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If such a match is found then sets N equal to zero, and sets result equal to ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[subs[N]].str())). Otherwise if no further matches were found, then let last_end be the endpoint of the last match that was found. Then if last_end != end and subs[0] == -1 sets N equal to -1 and sets result equal to value_type(last_end, end). Otherwise sets *this equal to the end of sequence iterator. </para></description></method>
  1360. <method name="operator++"><type><classname>regex_token_iterator</classname>&lt; BidiIter &gt;</type><parameter name=""><paramtype>int</paramtype></parameter></method>
  1361. </method-group>
  1362. <constructor><description><para>
  1363. </para></description><postconditions><para><computeroutput>*this</computeroutput> is the end of sequence iterator. </para>
  1364. </postconditions></constructor>
  1365. <constructor><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the character range to search. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the character range to search. </para></description></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regex pattern to search for. </para></description></parameter><description><para>
  1366. </para></description><requires><para><computeroutput/>[begin,end) is a valid range. </para>
  1367. </requires></constructor>
  1368. <constructor><template>
  1369. <template-type-parameter name="LetExpr"/>
  1370. </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the character range to search. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the character range to search. </para></description></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regex pattern to search for. </para></description></parameter><parameter name="args"><paramtype><emphasis>unspecified</emphasis></paramtype><description><para>A let() expression with argument bindings for semantic actions. </para></description></parameter><description><para>
  1371. </para></description><requires><para><computeroutput/>[begin,end) is a valid range. </para>
  1372. </requires></constructor>
  1373. <constructor><template>
  1374. <template-type-parameter name="Subs"/>
  1375. </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the character range to search. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the character range to search. </para></description></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regex pattern to search for. </para></description></parameter><parameter name="subs"><paramtype>Subs const &amp;</paramtype><description><para>A range of integers designating sub-matches to be treated as tokens. </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.) </para></description></parameter><description><para>
  1376. </para></description><requires><para><computeroutput/>[begin,end) is a valid range. </para>
  1377. </requires><requires><para><computeroutput>subs</computeroutput> is either an integer greater or equal to -1, or else an array or non-empty <computeroutput>std::vector&lt;&gt;</computeroutput> of such integers. </para>
  1378. </requires></constructor>
  1379. <constructor><template>
  1380. <template-type-parameter name="Subs"/>
  1381. <template-type-parameter name="LetExpr"/>
  1382. </template><parameter name="begin"><paramtype>BidiIter</paramtype><description><para>The beginning of the character range to search. </para></description></parameter><parameter name="end"><paramtype>BidiIter</paramtype><description><para>The end of the character range to search. </para></description></parameter><parameter name="rex"><paramtype><classname>basic_regex</classname>&lt; BidiIter &gt; const &amp;</paramtype><description><para>The regex pattern to search for. </para></description></parameter><parameter name="subs"><paramtype>Subs const &amp;</paramtype><description><para>A range of integers designating sub-matches to be treated as tokens. </para></description></parameter><parameter name="args"><paramtype><emphasis>unspecified</emphasis></paramtype><description><para>A let() expression with argument bindings for semantic actions. </para></description></parameter><parameter name="flags"><paramtype>regex_constants::match_flag_type</paramtype><default>regex_constants::match_default</default><description><para>Optional match flags, used to control how the expression is matched against the sequence. (See match_flag_type.) </para></description></parameter><description><para>
  1383. </para></description><requires><para><computeroutput/>[begin,end) is a valid range. </para>
  1384. </requires><requires><para><computeroutput>subs</computeroutput> is either an integer greater or equal to -1, or else an array or non-empty <computeroutput>std::vector&lt;&gt;</computeroutput> of such integers. </para>
  1385. </requires></constructor>
  1386. <constructor><parameter name="that"><paramtype><classname>regex_token_iterator</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><description><para>
  1387. </para></description><postconditions><para><computeroutput>*this == that</computeroutput> </para>
  1388. </postconditions></constructor>
  1389. <copy-assignment><type><classname>regex_token_iterator</classname>&lt; BidiIter &gt; &amp;</type><parameter name="that"><paramtype><classname>regex_token_iterator</classname>&lt; BidiIter &gt; const &amp;</paramtype></parameter><description><para>
  1390. </para></description><postconditions><para><computeroutput>*this == that</computeroutput> </para>
  1391. </postconditions></copy-assignment>
  1392. <method-group name="private member functions">
  1393. </method-group>
  1394. </struct><struct name="regex_traits"><template>
  1395. <template-type-parameter name="Char"/>
  1396. <template-type-parameter name="Impl"/>
  1397. </template><inherit access="public">Impl</inherit><description><para>Thin wrapper around the default <classname alt="boost::xpressive::regex_traits">regex_traits</classname> implementation, either <classname alt="boost::xpressive::cpp_regex_traits">cpp_regex_traits</classname> or <classname alt="boost::xpressive::c_regex_traits">c_regex_traits</classname> </para></description><method-group name="public member functions">
  1398. </method-group>
  1399. <constructor/>
  1400. <constructor specifiers="explicit"><parameter name="loc"><paramtype>locale_type const &amp;</paramtype></parameter></constructor>
  1401. </struct><struct name="sub_match"><template>
  1402. <template-type-parameter name="BidiIter"/>
  1403. </template><inherit access="public">std::pair&lt; BidiIter, BidiIter &gt;</inherit><purpose>Class template <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname></computeroutput> denotes the sequence of characters matched by a particular marked sub-expression. </purpose><description><para>When the marked sub-expression denoted by an object of type <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> participated in a regular expression match then member <computeroutput>matched</computeroutput> evaluates to <computeroutput>true</computeroutput>, and members <computeroutput>first</computeroutput> and <computeroutput>second</computeroutput> denote the range of characters <computeroutput>[first,second)</computeroutput> which formed that match. Otherwise <computeroutput>matched</computeroutput> is <computeroutput>false</computeroutput>, and members <computeroutput>first</computeroutput> and <computeroutput>second</computeroutput> contained undefined values.</para><para>If an object of type <computeroutput><classname alt="boost::xpressive::sub_match">sub_match</classname>&lt;&gt;</computeroutput> represents sub-expression 0 - that is to say the whole match - then member <computeroutput>matched</computeroutput> is always <computeroutput>true</computeroutput>, unless a partial match was obtained as a result of the flag <computeroutput>match_partial</computeroutput> being passed to a regular expression algorithm, in which case member <computeroutput>matched</computeroutput> is <computeroutput>false</computeroutput>, and members <computeroutput>first</computeroutput> and <computeroutput>second</computeroutput> represent the character range that formed the partial match. </para></description><method-group name="public member functions">
  1404. <method name="str" cv="const"><type>string_type</type></method>
  1405. <method name="conversion-operator" cv="const"><type>string_type</type></method>
  1406. <method name="length" cv="const"><type>difference_type</type></method>
  1407. <method name="conversion-operator" cv="const"><type>bool_type</type></method>
  1408. <method name="operator !" cv="const"><type>bool</type></method>
  1409. <method name="compare" cv="const"><type>int</type><parameter name="str"><paramtype>string_type const &amp;</paramtype><description><para>the string against which to compare </para></description></parameter><purpose>Performs a lexicographic string comparison. </purpose><description><para>
  1410. </para></description><returns><para>the results of <computeroutput>(*this).str().compare(str)</computeroutput> </para>
  1411. </returns></method>
  1412. <method name="compare" cv="const"><type>int</type><parameter name="sub"><paramtype><classname>sub_match</classname> const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1413. <method name="compare" cv="const"><type>int</type><parameter name="ptr"><paramtype>value_type const *</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1414. </method-group>
  1415. <constructor/>
  1416. <constructor><parameter name="first"><paramtype>BidiIter</paramtype></parameter><parameter name="second"><paramtype>BidiIter</paramtype></parameter><parameter name="matched_"><paramtype>bool</paramtype><default>false</default></parameter></constructor>
  1417. </struct><struct name="value"><template>
  1418. <template-type-parameter name="T"><purpose><para>The type of the value to store.</para></purpose></template-type-parameter>
  1419. </template><inherit access="public">proto::extends&lt; proto::terminal&lt; T &gt;::type, value&lt; T &gt; &gt;</inherit><purpose><computeroutput>value&lt;&gt;</computeroutput> is a lazy wrapper for a value that can be used in xpressive semantic actions. </purpose><description><para>
  1420. Below is an example that shows where <computeroutput><computeroutput>value&lt;&gt;</computeroutput></computeroutput> is useful.<programlisting language="c++">sregex good_voodoo(boost::shared_ptr&lt;int&gt; pi)
  1421. {
  1422. using namespace boost::xpressive;
  1423. // Use val() to hold the shared_ptr by value:
  1424. sregex rex = +( _d [ ++*val(pi) ] &gt;&gt; '!' );
  1425. // OK, rex holds a reference count to the integer.
  1426. return rex;
  1427. }
  1428. </programlisting>In the above code, <computeroutput>xpressive::val()</computeroutput> is a function that returns a <computeroutput>value&lt;&gt;</computeroutput> object. Had <computeroutput>val()</computeroutput> not been used here, the operation <computeroutput>++*pi</computeroutput> would have been evaluated eagerly once, instead of lazily when the regex match happens. </para></description><method-group name="public member functions">
  1429. <method name="get"><type>T &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1430. <method name="get" cv="const"><type>T const &amp;</type><purpose>Fetch the stored value. </purpose></method>
  1431. </method-group>
  1432. <constructor><purpose>Store a default-constructed <computeroutput>T</computeroutput>. </purpose></constructor>
  1433. <constructor specifiers="explicit"><parameter name="t"><paramtype>T const &amp;</paramtype><description><para>The initial value. </para></description></parameter><purpose>Store a copy of <computeroutput>t</computeroutput>. </purpose><description><para>
  1434. </para></description></constructor>
  1435. </struct><namespace name="op">
  1436. <struct name="as"><template>
  1437. <template-type-parameter name="T"><purpose><para>The type to which to lexically cast the parameter. </para></purpose></template-type-parameter>
  1438. </template><purpose><computeroutput>as&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for lexically casting a parameter to a different type. </purpose><description><para>
  1439. </para></description><method-group name="public member functions">
  1440. <method name="operator()" cv="const"><type>T</type><template>
  1441. <template-type-parameter name="Value"/>
  1442. </template><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to lexically cast. </para></description></parameter><description><para>
  1443. </para></description><returns><para><computeroutput>boost::lexical_cast&lt;T&gt;(val)</computeroutput> </para>
  1444. </returns></method>
  1445. </method-group>
  1446. <method-group name="private member functions">
  1447. </method-group>
  1448. </struct><struct name="const_cast_"><template>
  1449. <template-type-parameter name="T"><purpose><para>The type to which to const-cast the parameter. </para></purpose></template-type-parameter>
  1450. </template><purpose><computeroutput><classname alt="boost::xpressive::op::const_cast_">const_cast_</classname>&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for const-casting a parameter to a cv qualification. </purpose><description><para>
  1451. </para></description><method-group name="public member functions">
  1452. <method name="operator()" cv="const"><type>T</type><template>
  1453. <template-type-parameter name="Value"/>
  1454. </template><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to const-cast. </para></description></parameter><description><para>
  1455. </para></description><requires><para>Types <computeroutput>T</computeroutput> and <computeroutput>Value</computeroutput> differ only in cv-qualification. </para>
  1456. </requires><returns><para><computeroutput>const_cast&lt;T&gt;(val)</computeroutput> </para>
  1457. </returns></method>
  1458. </method-group>
  1459. </struct><struct name="construct"><template>
  1460. <template-type-parameter name="T"><purpose><para>The type of the object to construct. </para></purpose></template-type-parameter>
  1461. </template><purpose><computeroutput>construct&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for constructing a new object. </purpose><description><para>
  1462. </para></description><method-group name="public member functions">
  1463. <method name="operator()" cv="const"><type>T</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1464. <method name="operator()" cv="const"><type>T</type><template>
  1465. <template-type-parameter name="A0"/>
  1466. </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1467. <method name="operator()" cv="const"><type>T</type><template>
  1468. <template-type-parameter name="A0"/>
  1469. <template-type-parameter name="A1"/>
  1470. </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1471. <method name="operator()" cv="const"><type>T</type><template>
  1472. <template-type-parameter name="A0"/>
  1473. <template-type-parameter name="A1"/>
  1474. <template-type-parameter name="A2"/>
  1475. </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype><description><para>The first argument to the constructor </para></description></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype><description><para>The second argument to the constructor </para></description></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype><description><para>The third argument to the constructor </para></description></parameter><description><para>
  1476. </para></description><returns><para><computeroutput>T(a0,a1,...)</computeroutput> </para>
  1477. </returns></method>
  1478. </method-group>
  1479. </struct><struct name="dynamic_cast_"><template>
  1480. <template-type-parameter name="T"><purpose><para>The type to which to dynamically cast the parameter. </para></purpose></template-type-parameter>
  1481. </template><purpose><computeroutput><classname alt="boost::xpressive::op::dynamic_cast_">dynamic_cast_</classname>&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for dynamically casting a parameter to a different type. </purpose><description><para>
  1482. </para></description><method-group name="public member functions">
  1483. <method name="operator()" cv="const"><type>T</type><template>
  1484. <template-type-parameter name="Value"/>
  1485. </template><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to dynamically cast. </para></description></parameter><description><para>
  1486. </para></description><returns><para><computeroutput>dynamic_cast&lt;T&gt;(val)</computeroutput> </para>
  1487. </returns></method>
  1488. </method-group>
  1489. </struct><struct name="static_cast_"><template>
  1490. <template-type-parameter name="T"><purpose><para>The type to which to statically cast the parameter. </para></purpose></template-type-parameter>
  1491. </template><purpose><computeroutput><classname alt="boost::xpressive::op::static_cast_">static_cast_</classname>&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for statically casting a parameter to a different type. </purpose><description><para>
  1492. </para></description><method-group name="public member functions">
  1493. <method name="operator()" cv="const"><type>T</type><template>
  1494. <template-type-parameter name="Value"/>
  1495. </template><parameter name="val"><paramtype>Value const &amp;</paramtype><description><para>The value to statically cast. </para></description></parameter><description><para>
  1496. </para></description><returns><para><computeroutput>static_cast&lt;T&gt;(val)</computeroutput> </para>
  1497. </returns></method>
  1498. </method-group>
  1499. </struct><struct name="throw_"><template>
  1500. <template-type-parameter name="Except"><purpose><para>The type of the object to throw. </para></purpose></template-type-parameter>
  1501. </template><purpose><computeroutput><classname alt="boost::xpressive::op::throw_">throw_</classname>&lt;&gt;</computeroutput> is a PolymorphicFunctionObject for throwing an exception. </purpose><description><para>
  1502. </para></description><method-group name="public member functions">
  1503. <method name="operator()" cv="const"><type>void</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1504. <method name="operator()" cv="const"><type>void</type><template>
  1505. <template-type-parameter name="A0"/>
  1506. </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1507. <method name="operator()" cv="const"><type>void</type><template>
  1508. <template-type-parameter name="A0"/>
  1509. <template-type-parameter name="A1"/>
  1510. </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method>
  1511. <method name="operator()" cv="const"><type>void</type><template>
  1512. <template-type-parameter name="A0"/>
  1513. <template-type-parameter name="A1"/>
  1514. <template-type-parameter name="A2"/>
  1515. </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype><description><para>The first argument to the constructor </para></description></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype><description><para>The second argument to the constructor </para></description></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype><description><para>The third argument to the constructor </para></description></parameter><description><para>
  1516. <note><para>This function makes use of the <computeroutput>BOOST_THROW_EXCEPTION</computeroutput> macro to actually throw the exception. See the documentation for the Boost.Exception library. </para>
  1517. </note>
  1518. </para></description><throws><simpara><classname>&lt;tt&gt;Except(a0</classname> </simpara></throws></method>
  1519. </method-group>
  1520. </struct></namespace>
  1521. <typedef name="regex_id_type"><type>void const *</type></typedef>
  1522. <typedef name="sregex"><type><classname>basic_regex</classname>&lt; std::string::const_iterator &gt;</type></typedef>
  1523. <typedef name="cregex"><type><classname>basic_regex</classname>&lt; char const * &gt;</type></typedef>
  1524. <typedef name="wsregex"><type><classname>basic_regex</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
  1525. <typedef name="wcregex"><type><classname>basic_regex</classname>&lt; wchar_t const * &gt;</type></typedef>
  1526. <typedef name="ssub_match"><type><classname>sub_match</classname>&lt; std::string::const_iterator &gt;</type></typedef>
  1527. <typedef name="csub_match"><type><classname>sub_match</classname>&lt; char const * &gt;</type></typedef>
  1528. <typedef name="wssub_match"><type><classname>sub_match</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
  1529. <typedef name="wcsub_match"><type><classname>sub_match</classname>&lt; wchar_t const * &gt;</type></typedef>
  1530. <typedef name="sregex_compiler"><type><classname>regex_compiler</classname>&lt; std::string::const_iterator &gt;</type></typedef>
  1531. <typedef name="cregex_compiler"><type><classname>regex_compiler</classname>&lt; char const * &gt;</type></typedef>
  1532. <typedef name="wsregex_compiler"><type><classname>regex_compiler</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
  1533. <typedef name="wcregex_compiler"><type><classname>regex_compiler</classname>&lt; wchar_t const * &gt;</type></typedef>
  1534. <typedef name="sregex_iterator"><type><classname>regex_iterator</classname>&lt; std::string::const_iterator &gt;</type></typedef>
  1535. <typedef name="cregex_iterator"><type><classname>regex_iterator</classname>&lt; char const * &gt;</type></typedef>
  1536. <typedef name="wsregex_iterator"><type><classname>regex_iterator</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
  1537. <typedef name="wcregex_iterator"><type><classname>regex_iterator</classname>&lt; wchar_t const * &gt;</type></typedef>
  1538. <typedef name="sregex_token_iterator"><type><classname>regex_token_iterator</classname>&lt; std::string::const_iterator &gt;</type></typedef>
  1539. <typedef name="cregex_token_iterator"><type><classname>regex_token_iterator</classname>&lt; char const * &gt;</type></typedef>
  1540. <typedef name="wsregex_token_iterator"><type><classname>regex_token_iterator</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
  1541. <typedef name="wcregex_token_iterator"><type><classname>regex_token_iterator</classname>&lt; wchar_t const * &gt;</type></typedef>
  1542. <typedef name="smatch"><type><classname>match_results</classname>&lt; std::string::const_iterator &gt;</type></typedef>
  1543. <typedef name="cmatch"><type><classname>match_results</classname>&lt; char const * &gt;</type></typedef>
  1544. <typedef name="wsmatch"><type><classname>match_results</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
  1545. <typedef name="wcmatch"><type><classname>match_results</classname>&lt; wchar_t const * &gt;</type></typedef>
  1546. <typedef name="sregex_id_filter_predicate"><type><classname>regex_id_filter_predicate</classname>&lt; std::string::const_iterator &gt;</type></typedef>
  1547. <typedef name="cregex_id_filter_predicate"><type><classname>regex_id_filter_predicate</classname>&lt; char const * &gt;</type></typedef>
  1548. <typedef name="wsregex_id_filter_predicate"><type><classname>regex_id_filter_predicate</classname>&lt; std::wstring::const_iterator &gt;</type></typedef>
  1549. <typedef name="wcregex_id_filter_predicate"><type><classname>regex_id_filter_predicate</classname>&lt; wchar_t const * &gt;</type></typedef>
  1550. </namespace>
  1551. </namespace>
  1552. <macro name="BOOST_PROTO_FUSION_V2"/>
  1553. <macro name="BOOST_XPRESSIVE_HAS_MS_STACK_GUARD"/>
  1554. </header>
  1555. <header name="boost/xpressive/xpressive_static.hpp">
  1556. <para>Includes everything you need to write static regular expressions and use them. </para></header>
  1557. <header name="boost/xpressive/xpressive_typeof.hpp">
  1558. <para>Type registrations so that xpressive can be used with the Boost.Typeof library. </para></header>
  1559. </library-reference>