expr.hpp 121 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743
  1. ///////////////////////////////////////////////////////////////////////////////
  2. /// \file expr.hpp
  3. /// Contains definition of expr\<\> class template.
  4. //
  5. // Copyright 2008 Eric Niebler. Distributed under the Boost
  6. // Software License, Version 1.0. (See accompanying file
  7. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. template<typename Tag, typename Arg0>
  9. struct expr<Tag, term<Arg0>, 0>
  10. {
  11. typedef Tag proto_tag;
  12. static const long proto_arity_c = 0;
  13. typedef mpl::long_<0 > proto_arity;
  14. typedef expr proto_base_expr;
  15. typedef term<Arg0> proto_args;
  16. typedef basic_expr<Tag, proto_args, 0 > proto_grammar;
  17. typedef default_domain proto_domain;
  18. typedef default_generator proto_generator;
  19. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  20. typedef expr proto_derived_expr;
  21. typedef void proto_is_expr_;
  22. typedef Arg0 proto_child0; proto_child0 child0;
  23. typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
  24. BOOST_FORCEINLINE
  25. expr const &proto_base() const
  26. {
  27. return *this;
  28. }
  29. BOOST_FORCEINLINE
  30. expr &proto_base()
  31. {
  32. return *this;
  33. }
  34. template<typename A0>
  35. BOOST_FORCEINLINE
  36. static expr const make(A0 &a0)
  37. {
  38. return detail::make_terminal(a0, static_cast<expr *>(0), static_cast<proto_args *>(0));
  39. }
  40. template<typename A0>
  41. BOOST_FORCEINLINE
  42. static expr const make(A0 const &a0)
  43. {
  44. return detail::make_terminal(a0, static_cast<expr *>(0), static_cast<proto_args *>(0));
  45. }
  46. typedef detail::not_a_valid_type address_of_hack_type_;
  47. BOOST_FORCEINLINE
  48. proto::expr<
  49. proto::tag::assign
  50. , list2<expr &, expr const &>
  51. , 2
  52. > const
  53. operator =(expr const &a)
  54. {
  55. proto::expr<
  56. proto::tag::assign
  57. , list2<expr &, expr const &>
  58. , 2
  59. > that = {*this, a};
  60. return that;
  61. }
  62. template<typename A>
  63. BOOST_FORCEINLINE
  64. proto::expr<
  65. proto::tag::assign
  66. , list2<expr const &, typename result_of::as_child<A>::type>
  67. , 2
  68. > const
  69. operator =(A &a) const
  70. {
  71. proto::expr<
  72. proto::tag::assign
  73. , list2<expr const &, typename result_of::as_child<A>::type>
  74. , 2
  75. > that = {*this, proto::as_child(a)};
  76. return that;
  77. }
  78. template<typename A>
  79. BOOST_FORCEINLINE
  80. proto::expr<
  81. proto::tag::assign
  82. , list2<expr const &, typename result_of::as_child<A const>::type>
  83. , 2
  84. > const
  85. operator =(A const &a) const
  86. {
  87. proto::expr<
  88. proto::tag::assign
  89. , list2<expr const &, typename result_of::as_child<A const>::type>
  90. , 2
  91. > that = {*this, proto::as_child(a)};
  92. return that;
  93. }
  94. template<typename A>
  95. BOOST_FORCEINLINE
  96. proto::expr<
  97. proto::tag::assign
  98. , list2<expr &, typename result_of::as_child<A>::type>
  99. , 2
  100. > const
  101. operator =(A &a)
  102. {
  103. proto::expr<
  104. proto::tag::assign
  105. , list2<expr &, typename result_of::as_child<A>::type>
  106. , 2
  107. > that = {*this, proto::as_child(a)};
  108. return that;
  109. }
  110. template<typename A>
  111. BOOST_FORCEINLINE
  112. proto::expr<
  113. proto::tag::assign
  114. , list2<expr &, typename result_of::as_child<A const>::type>
  115. , 2
  116. > const
  117. operator =(A const &a)
  118. {
  119. proto::expr<
  120. proto::tag::assign
  121. , list2<expr &, typename result_of::as_child<A const>::type>
  122. , 2
  123. > that = {*this, proto::as_child(a)};
  124. return that;
  125. }
  126. template<typename A>
  127. BOOST_FORCEINLINE
  128. proto::expr<
  129. proto::tag::subscript
  130. , list2<expr const &, typename result_of::as_child<A>::type>
  131. , 2
  132. > const
  133. operator [](A &a) const
  134. {
  135. proto::expr<
  136. proto::tag::subscript
  137. , list2<expr const &, typename result_of::as_child<A>::type>
  138. , 2
  139. > that = {*this, proto::as_child(a)};
  140. return that;
  141. }
  142. template<typename A>
  143. BOOST_FORCEINLINE
  144. proto::expr<
  145. proto::tag::subscript
  146. , list2<expr const &, typename result_of::as_child<A const>::type>
  147. , 2
  148. > const
  149. operator [](A const &a) const
  150. {
  151. proto::expr<
  152. proto::tag::subscript
  153. , list2<expr const &, typename result_of::as_child<A const>::type>
  154. , 2
  155. > that = {*this, proto::as_child(a)};
  156. return that;
  157. }
  158. template<typename A>
  159. BOOST_FORCEINLINE
  160. proto::expr<
  161. proto::tag::subscript
  162. , list2<expr &, typename result_of::as_child<A>::type>
  163. , 2
  164. > const
  165. operator [](A &a)
  166. {
  167. proto::expr<
  168. proto::tag::subscript
  169. , list2<expr &, typename result_of::as_child<A>::type>
  170. , 2
  171. > that = {*this, proto::as_child(a)};
  172. return that;
  173. }
  174. template<typename A>
  175. BOOST_FORCEINLINE
  176. proto::expr<
  177. proto::tag::subscript
  178. , list2<expr &, typename result_of::as_child<A const>::type>
  179. , 2
  180. > const
  181. operator [](A const &a)
  182. {
  183. proto::expr<
  184. proto::tag::subscript
  185. , list2<expr &, typename result_of::as_child<A const>::type>
  186. , 2
  187. > that = {*this, proto::as_child(a)};
  188. return that;
  189. }
  190. template<typename Sig>
  191. struct result
  192. {
  193. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  194. };
  195. BOOST_FORCEINLINE
  196. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  197. operator ()() const
  198. {
  199. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  200. return that;
  201. }
  202. BOOST_FORCEINLINE
  203. proto::expr<proto::tag::function, list1<expr &>, 1> const
  204. operator ()()
  205. {
  206. proto::expr<proto::tag::function, list1<expr &>, 1> that = {*this};
  207. return that;
  208. }
  209. template<typename A0>
  210. BOOST_FORCEINLINE
  211. typename result_of::funop1<
  212. expr const
  213. , default_domain , const A0
  214. >::type const
  215. operator ()(A0 const &a0) const
  216. {
  217. return result_of::funop1<
  218. expr const
  219. , default_domain , const A0
  220. >::call(*this , a0);
  221. }
  222. template<typename A0>
  223. BOOST_FORCEINLINE
  224. typename result_of::funop1<
  225. expr
  226. , default_domain , const A0
  227. >::type const
  228. operator ()(A0 const &a0)
  229. {
  230. return result_of::funop1<
  231. expr
  232. , default_domain , const A0
  233. >::call(*this , a0);
  234. }
  235. template<typename A0 , typename A1>
  236. BOOST_FORCEINLINE
  237. typename result_of::funop2<
  238. expr const
  239. , default_domain , const A0 , const A1
  240. >::type const
  241. operator ()(A0 const &a0 , A1 const &a1) const
  242. {
  243. return result_of::funop2<
  244. expr const
  245. , default_domain , const A0 , const A1
  246. >::call(*this , a0 , a1);
  247. }
  248. template<typename A0 , typename A1>
  249. BOOST_FORCEINLINE
  250. typename result_of::funop2<
  251. expr
  252. , default_domain , const A0 , const A1
  253. >::type const
  254. operator ()(A0 const &a0 , A1 const &a1)
  255. {
  256. return result_of::funop2<
  257. expr
  258. , default_domain , const A0 , const A1
  259. >::call(*this , a0 , a1);
  260. }
  261. template<typename A0 , typename A1 , typename A2>
  262. BOOST_FORCEINLINE
  263. typename result_of::funop3<
  264. expr const
  265. , default_domain , const A0 , const A1 , const A2
  266. >::type const
  267. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  268. {
  269. return result_of::funop3<
  270. expr const
  271. , default_domain , const A0 , const A1 , const A2
  272. >::call(*this , a0 , a1 , a2);
  273. }
  274. template<typename A0 , typename A1 , typename A2>
  275. BOOST_FORCEINLINE
  276. typename result_of::funop3<
  277. expr
  278. , default_domain , const A0 , const A1 , const A2
  279. >::type const
  280. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2)
  281. {
  282. return result_of::funop3<
  283. expr
  284. , default_domain , const A0 , const A1 , const A2
  285. >::call(*this , a0 , a1 , a2);
  286. }
  287. template<typename A0 , typename A1 , typename A2 , typename A3>
  288. BOOST_FORCEINLINE
  289. typename result_of::funop4<
  290. expr const
  291. , default_domain , const A0 , const A1 , const A2 , const A3
  292. >::type const
  293. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  294. {
  295. return result_of::funop4<
  296. expr const
  297. , default_domain , const A0 , const A1 , const A2 , const A3
  298. >::call(*this , a0 , a1 , a2 , a3);
  299. }
  300. template<typename A0 , typename A1 , typename A2 , typename A3>
  301. BOOST_FORCEINLINE
  302. typename result_of::funop4<
  303. expr
  304. , default_domain , const A0 , const A1 , const A2 , const A3
  305. >::type const
  306. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3)
  307. {
  308. return result_of::funop4<
  309. expr
  310. , default_domain , const A0 , const A1 , const A2 , const A3
  311. >::call(*this , a0 , a1 , a2 , a3);
  312. }
  313. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  314. BOOST_FORCEINLINE
  315. typename result_of::funop5<
  316. expr const
  317. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  318. >::type const
  319. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  320. {
  321. return result_of::funop5<
  322. expr const
  323. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  324. >::call(*this , a0 , a1 , a2 , a3 , a4);
  325. }
  326. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  327. BOOST_FORCEINLINE
  328. typename result_of::funop5<
  329. expr
  330. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  331. >::type const
  332. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4)
  333. {
  334. return result_of::funop5<
  335. expr
  336. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  337. >::call(*this , a0 , a1 , a2 , a3 , a4);
  338. }
  339. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  340. BOOST_FORCEINLINE
  341. typename result_of::funop6<
  342. expr const
  343. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  344. >::type const
  345. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  346. {
  347. return result_of::funop6<
  348. expr const
  349. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  350. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  351. }
  352. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  353. BOOST_FORCEINLINE
  354. typename result_of::funop6<
  355. expr
  356. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  357. >::type const
  358. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5)
  359. {
  360. return result_of::funop6<
  361. expr
  362. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  363. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  364. }
  365. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  366. BOOST_FORCEINLINE
  367. typename result_of::funop7<
  368. expr const
  369. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  370. >::type const
  371. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  372. {
  373. return result_of::funop7<
  374. expr const
  375. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  376. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  377. }
  378. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  379. BOOST_FORCEINLINE
  380. typename result_of::funop7<
  381. expr
  382. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  383. >::type const
  384. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6)
  385. {
  386. return result_of::funop7<
  387. expr
  388. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  389. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  390. }
  391. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  392. BOOST_FORCEINLINE
  393. typename result_of::funop8<
  394. expr const
  395. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  396. >::type const
  397. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  398. {
  399. return result_of::funop8<
  400. expr const
  401. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  402. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  403. }
  404. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  405. BOOST_FORCEINLINE
  406. typename result_of::funop8<
  407. expr
  408. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  409. >::type const
  410. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7)
  411. {
  412. return result_of::funop8<
  413. expr
  414. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  415. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  416. }
  417. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  418. BOOST_FORCEINLINE
  419. typename result_of::funop9<
  420. expr const
  421. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  422. >::type const
  423. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  424. {
  425. return result_of::funop9<
  426. expr const
  427. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  428. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  429. }
  430. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  431. BOOST_FORCEINLINE
  432. typename result_of::funop9<
  433. expr
  434. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  435. >::type const
  436. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8)
  437. {
  438. return result_of::funop9<
  439. expr
  440. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  441. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  442. }
  443. };
  444. template<typename Tag , typename Arg0>
  445. struct expr<Tag, list1<Arg0>, 1 >
  446. {
  447. typedef Tag proto_tag;
  448. static const long proto_arity_c = 1;
  449. typedef mpl::long_<1 > proto_arity;
  450. typedef expr proto_base_expr;
  451. typedef list1<Arg0> proto_args;
  452. typedef basic_expr<Tag, proto_args, 1 > proto_grammar;
  453. typedef default_domain proto_domain;
  454. typedef default_generator proto_generator;
  455. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  456. typedef expr proto_derived_expr;
  457. typedef void proto_is_expr_;
  458. typedef Arg0 proto_child0; proto_child0 child0;
  459. typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
  460. BOOST_FORCEINLINE
  461. expr const &proto_base() const
  462. {
  463. return *this;
  464. }
  465. BOOST_FORCEINLINE
  466. expr &proto_base()
  467. {
  468. return *this;
  469. }
  470. template<typename A0>
  471. BOOST_FORCEINLINE
  472. static expr const make(A0 const &a0)
  473. {
  474. expr that = {a0};
  475. return that;
  476. }
  477. typedef typename detail::address_of_hack<Tag, proto_child0>::type address_of_hack_type_;
  478. BOOST_FORCEINLINE
  479. operator address_of_hack_type_() const
  480. {
  481. return boost::addressof(this->child0);
  482. }
  483. BOOST_FORCEINLINE
  484. proto::expr<
  485. proto::tag::assign
  486. , list2<expr &, expr const &>
  487. , 2
  488. > const
  489. operator =(expr const &a)
  490. {
  491. proto::expr<
  492. proto::tag::assign
  493. , list2<expr &, expr const &>
  494. , 2
  495. > that = {*this, a};
  496. return that;
  497. }
  498. template<typename A>
  499. BOOST_FORCEINLINE
  500. proto::expr<
  501. proto::tag::assign
  502. , list2<expr const &, typename result_of::as_child<A>::type>
  503. , 2
  504. > const
  505. operator =(A &a) const
  506. {
  507. proto::expr<
  508. proto::tag::assign
  509. , list2<expr const &, typename result_of::as_child<A>::type>
  510. , 2
  511. > that = {*this, proto::as_child(a)};
  512. return that;
  513. }
  514. template<typename A>
  515. BOOST_FORCEINLINE
  516. proto::expr<
  517. proto::tag::assign
  518. , list2<expr const &, typename result_of::as_child<A const>::type>
  519. , 2
  520. > const
  521. operator =(A const &a) const
  522. {
  523. proto::expr<
  524. proto::tag::assign
  525. , list2<expr const &, typename result_of::as_child<A const>::type>
  526. , 2
  527. > that = {*this, proto::as_child(a)};
  528. return that;
  529. }
  530. template<typename A>
  531. BOOST_FORCEINLINE
  532. proto::expr<
  533. proto::tag::subscript
  534. , list2<expr const &, typename result_of::as_child<A>::type>
  535. , 2
  536. > const
  537. operator [](A &a) const
  538. {
  539. proto::expr<
  540. proto::tag::subscript
  541. , list2<expr const &, typename result_of::as_child<A>::type>
  542. , 2
  543. > that = {*this, proto::as_child(a)};
  544. return that;
  545. }
  546. template<typename A>
  547. BOOST_FORCEINLINE
  548. proto::expr<
  549. proto::tag::subscript
  550. , list2<expr const &, typename result_of::as_child<A const>::type>
  551. , 2
  552. > const
  553. operator [](A const &a) const
  554. {
  555. proto::expr<
  556. proto::tag::subscript
  557. , list2<expr const &, typename result_of::as_child<A const>::type>
  558. , 2
  559. > that = {*this, proto::as_child(a)};
  560. return that;
  561. }
  562. template<typename Sig>
  563. struct result
  564. {
  565. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  566. };
  567. BOOST_FORCEINLINE
  568. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  569. operator ()() const
  570. {
  571. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  572. return that;
  573. }
  574. template<typename A0>
  575. BOOST_FORCEINLINE
  576. typename result_of::funop1<
  577. expr const
  578. , default_domain , const A0
  579. >::type const
  580. operator ()(A0 const &a0) const
  581. {
  582. return result_of::funop1<
  583. expr const
  584. , default_domain , const A0
  585. >::call(*this , a0);
  586. }
  587. template<typename A0 , typename A1>
  588. BOOST_FORCEINLINE
  589. typename result_of::funop2<
  590. expr const
  591. , default_domain , const A0 , const A1
  592. >::type const
  593. operator ()(A0 const &a0 , A1 const &a1) const
  594. {
  595. return result_of::funop2<
  596. expr const
  597. , default_domain , const A0 , const A1
  598. >::call(*this , a0 , a1);
  599. }
  600. template<typename A0 , typename A1 , typename A2>
  601. BOOST_FORCEINLINE
  602. typename result_of::funop3<
  603. expr const
  604. , default_domain , const A0 , const A1 , const A2
  605. >::type const
  606. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  607. {
  608. return result_of::funop3<
  609. expr const
  610. , default_domain , const A0 , const A1 , const A2
  611. >::call(*this , a0 , a1 , a2);
  612. }
  613. template<typename A0 , typename A1 , typename A2 , typename A3>
  614. BOOST_FORCEINLINE
  615. typename result_of::funop4<
  616. expr const
  617. , default_domain , const A0 , const A1 , const A2 , const A3
  618. >::type const
  619. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  620. {
  621. return result_of::funop4<
  622. expr const
  623. , default_domain , const A0 , const A1 , const A2 , const A3
  624. >::call(*this , a0 , a1 , a2 , a3);
  625. }
  626. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  627. BOOST_FORCEINLINE
  628. typename result_of::funop5<
  629. expr const
  630. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  631. >::type const
  632. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  633. {
  634. return result_of::funop5<
  635. expr const
  636. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  637. >::call(*this , a0 , a1 , a2 , a3 , a4);
  638. }
  639. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  640. BOOST_FORCEINLINE
  641. typename result_of::funop6<
  642. expr const
  643. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  644. >::type const
  645. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  646. {
  647. return result_of::funop6<
  648. expr const
  649. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  650. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  651. }
  652. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  653. BOOST_FORCEINLINE
  654. typename result_of::funop7<
  655. expr const
  656. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  657. >::type const
  658. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  659. {
  660. return result_of::funop7<
  661. expr const
  662. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  663. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  664. }
  665. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  666. BOOST_FORCEINLINE
  667. typename result_of::funop8<
  668. expr const
  669. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  670. >::type const
  671. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  672. {
  673. return result_of::funop8<
  674. expr const
  675. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  676. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  677. }
  678. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  679. BOOST_FORCEINLINE
  680. typename result_of::funop9<
  681. expr const
  682. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  683. >::type const
  684. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  685. {
  686. return result_of::funop9<
  687. expr const
  688. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  689. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  690. }
  691. };
  692. template<typename Tag , typename Arg0 , typename Arg1>
  693. struct expr<Tag, list2<Arg0 , Arg1>, 2 >
  694. {
  695. typedef Tag proto_tag;
  696. static const long proto_arity_c = 2;
  697. typedef mpl::long_<2 > proto_arity;
  698. typedef expr proto_base_expr;
  699. typedef list2<Arg0 , Arg1> proto_args;
  700. typedef basic_expr<Tag, proto_args, 2 > proto_grammar;
  701. typedef default_domain proto_domain;
  702. typedef default_generator proto_generator;
  703. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  704. typedef expr proto_derived_expr;
  705. typedef void proto_is_expr_;
  706. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1;
  707. typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
  708. BOOST_FORCEINLINE
  709. expr const &proto_base() const
  710. {
  711. return *this;
  712. }
  713. BOOST_FORCEINLINE
  714. expr &proto_base()
  715. {
  716. return *this;
  717. }
  718. template<typename A0 , typename A1>
  719. BOOST_FORCEINLINE
  720. static expr const make(A0 const &a0 , A1 const &a1)
  721. {
  722. expr that = {a0 , a1};
  723. return that;
  724. }
  725. typedef detail::not_a_valid_type address_of_hack_type_;
  726. BOOST_FORCEINLINE
  727. proto::expr<
  728. proto::tag::assign
  729. , list2<expr &, expr const &>
  730. , 2
  731. > const
  732. operator =(expr const &a)
  733. {
  734. proto::expr<
  735. proto::tag::assign
  736. , list2<expr &, expr const &>
  737. , 2
  738. > that = {*this, a};
  739. return that;
  740. }
  741. template<typename A>
  742. BOOST_FORCEINLINE
  743. proto::expr<
  744. proto::tag::assign
  745. , list2<expr const &, typename result_of::as_child<A>::type>
  746. , 2
  747. > const
  748. operator =(A &a) const
  749. {
  750. proto::expr<
  751. proto::tag::assign
  752. , list2<expr const &, typename result_of::as_child<A>::type>
  753. , 2
  754. > that = {*this, proto::as_child(a)};
  755. return that;
  756. }
  757. template<typename A>
  758. BOOST_FORCEINLINE
  759. proto::expr<
  760. proto::tag::assign
  761. , list2<expr const &, typename result_of::as_child<A const>::type>
  762. , 2
  763. > const
  764. operator =(A const &a) const
  765. {
  766. proto::expr<
  767. proto::tag::assign
  768. , list2<expr const &, typename result_of::as_child<A const>::type>
  769. , 2
  770. > that = {*this, proto::as_child(a)};
  771. return that;
  772. }
  773. template<typename A>
  774. BOOST_FORCEINLINE
  775. proto::expr<
  776. proto::tag::subscript
  777. , list2<expr const &, typename result_of::as_child<A>::type>
  778. , 2
  779. > const
  780. operator [](A &a) const
  781. {
  782. proto::expr<
  783. proto::tag::subscript
  784. , list2<expr const &, typename result_of::as_child<A>::type>
  785. , 2
  786. > that = {*this, proto::as_child(a)};
  787. return that;
  788. }
  789. template<typename A>
  790. BOOST_FORCEINLINE
  791. proto::expr<
  792. proto::tag::subscript
  793. , list2<expr const &, typename result_of::as_child<A const>::type>
  794. , 2
  795. > const
  796. operator [](A const &a) const
  797. {
  798. proto::expr<
  799. proto::tag::subscript
  800. , list2<expr const &, typename result_of::as_child<A const>::type>
  801. , 2
  802. > that = {*this, proto::as_child(a)};
  803. return that;
  804. }
  805. template<typename Sig>
  806. struct result
  807. {
  808. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  809. };
  810. BOOST_FORCEINLINE
  811. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  812. operator ()() const
  813. {
  814. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  815. return that;
  816. }
  817. template<typename A0>
  818. BOOST_FORCEINLINE
  819. typename result_of::funop1<
  820. expr const
  821. , default_domain , const A0
  822. >::type const
  823. operator ()(A0 const &a0) const
  824. {
  825. return result_of::funop1<
  826. expr const
  827. , default_domain , const A0
  828. >::call(*this , a0);
  829. }
  830. template<typename A0 , typename A1>
  831. BOOST_FORCEINLINE
  832. typename result_of::funop2<
  833. expr const
  834. , default_domain , const A0 , const A1
  835. >::type const
  836. operator ()(A0 const &a0 , A1 const &a1) const
  837. {
  838. return result_of::funop2<
  839. expr const
  840. , default_domain , const A0 , const A1
  841. >::call(*this , a0 , a1);
  842. }
  843. template<typename A0 , typename A1 , typename A2>
  844. BOOST_FORCEINLINE
  845. typename result_of::funop3<
  846. expr const
  847. , default_domain , const A0 , const A1 , const A2
  848. >::type const
  849. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  850. {
  851. return result_of::funop3<
  852. expr const
  853. , default_domain , const A0 , const A1 , const A2
  854. >::call(*this , a0 , a1 , a2);
  855. }
  856. template<typename A0 , typename A1 , typename A2 , typename A3>
  857. BOOST_FORCEINLINE
  858. typename result_of::funop4<
  859. expr const
  860. , default_domain , const A0 , const A1 , const A2 , const A3
  861. >::type const
  862. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  863. {
  864. return result_of::funop4<
  865. expr const
  866. , default_domain , const A0 , const A1 , const A2 , const A3
  867. >::call(*this , a0 , a1 , a2 , a3);
  868. }
  869. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  870. BOOST_FORCEINLINE
  871. typename result_of::funop5<
  872. expr const
  873. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  874. >::type const
  875. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  876. {
  877. return result_of::funop5<
  878. expr const
  879. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  880. >::call(*this , a0 , a1 , a2 , a3 , a4);
  881. }
  882. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  883. BOOST_FORCEINLINE
  884. typename result_of::funop6<
  885. expr const
  886. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  887. >::type const
  888. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  889. {
  890. return result_of::funop6<
  891. expr const
  892. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  893. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  894. }
  895. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  896. BOOST_FORCEINLINE
  897. typename result_of::funop7<
  898. expr const
  899. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  900. >::type const
  901. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  902. {
  903. return result_of::funop7<
  904. expr const
  905. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  906. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  907. }
  908. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  909. BOOST_FORCEINLINE
  910. typename result_of::funop8<
  911. expr const
  912. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  913. >::type const
  914. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  915. {
  916. return result_of::funop8<
  917. expr const
  918. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  919. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  920. }
  921. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  922. BOOST_FORCEINLINE
  923. typename result_of::funop9<
  924. expr const
  925. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  926. >::type const
  927. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  928. {
  929. return result_of::funop9<
  930. expr const
  931. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  932. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  933. }
  934. };
  935. template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2>
  936. struct expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3 >
  937. {
  938. typedef Tag proto_tag;
  939. static const long proto_arity_c = 3;
  940. typedef mpl::long_<3 > proto_arity;
  941. typedef expr proto_base_expr;
  942. typedef list3<Arg0 , Arg1 , Arg2> proto_args;
  943. typedef basic_expr<Tag, proto_args, 3 > proto_grammar;
  944. typedef default_domain proto_domain;
  945. typedef default_generator proto_generator;
  946. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  947. typedef expr proto_derived_expr;
  948. typedef void proto_is_expr_;
  949. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2;
  950. typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
  951. BOOST_FORCEINLINE
  952. expr const &proto_base() const
  953. {
  954. return *this;
  955. }
  956. BOOST_FORCEINLINE
  957. expr &proto_base()
  958. {
  959. return *this;
  960. }
  961. template<typename A0 , typename A1 , typename A2>
  962. BOOST_FORCEINLINE
  963. static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2)
  964. {
  965. expr that = {a0 , a1 , a2};
  966. return that;
  967. }
  968. typedef detail::not_a_valid_type address_of_hack_type_;
  969. BOOST_FORCEINLINE
  970. proto::expr<
  971. proto::tag::assign
  972. , list2<expr &, expr const &>
  973. , 2
  974. > const
  975. operator =(expr const &a)
  976. {
  977. proto::expr<
  978. proto::tag::assign
  979. , list2<expr &, expr const &>
  980. , 2
  981. > that = {*this, a};
  982. return that;
  983. }
  984. template<typename A>
  985. BOOST_FORCEINLINE
  986. proto::expr<
  987. proto::tag::assign
  988. , list2<expr const &, typename result_of::as_child<A>::type>
  989. , 2
  990. > const
  991. operator =(A &a) const
  992. {
  993. proto::expr<
  994. proto::tag::assign
  995. , list2<expr const &, typename result_of::as_child<A>::type>
  996. , 2
  997. > that = {*this, proto::as_child(a)};
  998. return that;
  999. }
  1000. template<typename A>
  1001. BOOST_FORCEINLINE
  1002. proto::expr<
  1003. proto::tag::assign
  1004. , list2<expr const &, typename result_of::as_child<A const>::type>
  1005. , 2
  1006. > const
  1007. operator =(A const &a) const
  1008. {
  1009. proto::expr<
  1010. proto::tag::assign
  1011. , list2<expr const &, typename result_of::as_child<A const>::type>
  1012. , 2
  1013. > that = {*this, proto::as_child(a)};
  1014. return that;
  1015. }
  1016. template<typename A>
  1017. BOOST_FORCEINLINE
  1018. proto::expr<
  1019. proto::tag::subscript
  1020. , list2<expr const &, typename result_of::as_child<A>::type>
  1021. , 2
  1022. > const
  1023. operator [](A &a) const
  1024. {
  1025. proto::expr<
  1026. proto::tag::subscript
  1027. , list2<expr const &, typename result_of::as_child<A>::type>
  1028. , 2
  1029. > that = {*this, proto::as_child(a)};
  1030. return that;
  1031. }
  1032. template<typename A>
  1033. BOOST_FORCEINLINE
  1034. proto::expr<
  1035. proto::tag::subscript
  1036. , list2<expr const &, typename result_of::as_child<A const>::type>
  1037. , 2
  1038. > const
  1039. operator [](A const &a) const
  1040. {
  1041. proto::expr<
  1042. proto::tag::subscript
  1043. , list2<expr const &, typename result_of::as_child<A const>::type>
  1044. , 2
  1045. > that = {*this, proto::as_child(a)};
  1046. return that;
  1047. }
  1048. template<typename Sig>
  1049. struct result
  1050. {
  1051. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  1052. };
  1053. BOOST_FORCEINLINE
  1054. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  1055. operator ()() const
  1056. {
  1057. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  1058. return that;
  1059. }
  1060. template<typename A0>
  1061. BOOST_FORCEINLINE
  1062. typename result_of::funop1<
  1063. expr const
  1064. , default_domain , const A0
  1065. >::type const
  1066. operator ()(A0 const &a0) const
  1067. {
  1068. return result_of::funop1<
  1069. expr const
  1070. , default_domain , const A0
  1071. >::call(*this , a0);
  1072. }
  1073. template<typename A0 , typename A1>
  1074. BOOST_FORCEINLINE
  1075. typename result_of::funop2<
  1076. expr const
  1077. , default_domain , const A0 , const A1
  1078. >::type const
  1079. operator ()(A0 const &a0 , A1 const &a1) const
  1080. {
  1081. return result_of::funop2<
  1082. expr const
  1083. , default_domain , const A0 , const A1
  1084. >::call(*this , a0 , a1);
  1085. }
  1086. template<typename A0 , typename A1 , typename A2>
  1087. BOOST_FORCEINLINE
  1088. typename result_of::funop3<
  1089. expr const
  1090. , default_domain , const A0 , const A1 , const A2
  1091. >::type const
  1092. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  1093. {
  1094. return result_of::funop3<
  1095. expr const
  1096. , default_domain , const A0 , const A1 , const A2
  1097. >::call(*this , a0 , a1 , a2);
  1098. }
  1099. template<typename A0 , typename A1 , typename A2 , typename A3>
  1100. BOOST_FORCEINLINE
  1101. typename result_of::funop4<
  1102. expr const
  1103. , default_domain , const A0 , const A1 , const A2 , const A3
  1104. >::type const
  1105. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  1106. {
  1107. return result_of::funop4<
  1108. expr const
  1109. , default_domain , const A0 , const A1 , const A2 , const A3
  1110. >::call(*this , a0 , a1 , a2 , a3);
  1111. }
  1112. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  1113. BOOST_FORCEINLINE
  1114. typename result_of::funop5<
  1115. expr const
  1116. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  1117. >::type const
  1118. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  1119. {
  1120. return result_of::funop5<
  1121. expr const
  1122. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  1123. >::call(*this , a0 , a1 , a2 , a3 , a4);
  1124. }
  1125. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  1126. BOOST_FORCEINLINE
  1127. typename result_of::funop6<
  1128. expr const
  1129. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  1130. >::type const
  1131. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  1132. {
  1133. return result_of::funop6<
  1134. expr const
  1135. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  1136. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  1137. }
  1138. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  1139. BOOST_FORCEINLINE
  1140. typename result_of::funop7<
  1141. expr const
  1142. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  1143. >::type const
  1144. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  1145. {
  1146. return result_of::funop7<
  1147. expr const
  1148. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  1149. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  1150. }
  1151. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  1152. BOOST_FORCEINLINE
  1153. typename result_of::funop8<
  1154. expr const
  1155. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  1156. >::type const
  1157. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  1158. {
  1159. return result_of::funop8<
  1160. expr const
  1161. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  1162. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  1163. }
  1164. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  1165. BOOST_FORCEINLINE
  1166. typename result_of::funop9<
  1167. expr const
  1168. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  1169. >::type const
  1170. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  1171. {
  1172. return result_of::funop9<
  1173. expr const
  1174. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  1175. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  1176. }
  1177. };
  1178. template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3>
  1179. struct expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4 >
  1180. {
  1181. typedef Tag proto_tag;
  1182. static const long proto_arity_c = 4;
  1183. typedef mpl::long_<4 > proto_arity;
  1184. typedef expr proto_base_expr;
  1185. typedef list4<Arg0 , Arg1 , Arg2 , Arg3> proto_args;
  1186. typedef basic_expr<Tag, proto_args, 4 > proto_grammar;
  1187. typedef default_domain proto_domain;
  1188. typedef default_generator proto_generator;
  1189. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  1190. typedef expr proto_derived_expr;
  1191. typedef void proto_is_expr_;
  1192. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3;
  1193. typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
  1194. BOOST_FORCEINLINE
  1195. expr const &proto_base() const
  1196. {
  1197. return *this;
  1198. }
  1199. BOOST_FORCEINLINE
  1200. expr &proto_base()
  1201. {
  1202. return *this;
  1203. }
  1204. template<typename A0 , typename A1 , typename A2 , typename A3>
  1205. BOOST_FORCEINLINE
  1206. static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3)
  1207. {
  1208. expr that = {a0 , a1 , a2 , a3};
  1209. return that;
  1210. }
  1211. typedef detail::not_a_valid_type address_of_hack_type_;
  1212. BOOST_FORCEINLINE
  1213. proto::expr<
  1214. proto::tag::assign
  1215. , list2<expr &, expr const &>
  1216. , 2
  1217. > const
  1218. operator =(expr const &a)
  1219. {
  1220. proto::expr<
  1221. proto::tag::assign
  1222. , list2<expr &, expr const &>
  1223. , 2
  1224. > that = {*this, a};
  1225. return that;
  1226. }
  1227. template<typename A>
  1228. BOOST_FORCEINLINE
  1229. proto::expr<
  1230. proto::tag::assign
  1231. , list2<expr const &, typename result_of::as_child<A>::type>
  1232. , 2
  1233. > const
  1234. operator =(A &a) const
  1235. {
  1236. proto::expr<
  1237. proto::tag::assign
  1238. , list2<expr const &, typename result_of::as_child<A>::type>
  1239. , 2
  1240. > that = {*this, proto::as_child(a)};
  1241. return that;
  1242. }
  1243. template<typename A>
  1244. BOOST_FORCEINLINE
  1245. proto::expr<
  1246. proto::tag::assign
  1247. , list2<expr const &, typename result_of::as_child<A const>::type>
  1248. , 2
  1249. > const
  1250. operator =(A const &a) const
  1251. {
  1252. proto::expr<
  1253. proto::tag::assign
  1254. , list2<expr const &, typename result_of::as_child<A const>::type>
  1255. , 2
  1256. > that = {*this, proto::as_child(a)};
  1257. return that;
  1258. }
  1259. template<typename A>
  1260. BOOST_FORCEINLINE
  1261. proto::expr<
  1262. proto::tag::subscript
  1263. , list2<expr const &, typename result_of::as_child<A>::type>
  1264. , 2
  1265. > const
  1266. operator [](A &a) const
  1267. {
  1268. proto::expr<
  1269. proto::tag::subscript
  1270. , list2<expr const &, typename result_of::as_child<A>::type>
  1271. , 2
  1272. > that = {*this, proto::as_child(a)};
  1273. return that;
  1274. }
  1275. template<typename A>
  1276. BOOST_FORCEINLINE
  1277. proto::expr<
  1278. proto::tag::subscript
  1279. , list2<expr const &, typename result_of::as_child<A const>::type>
  1280. , 2
  1281. > const
  1282. operator [](A const &a) const
  1283. {
  1284. proto::expr<
  1285. proto::tag::subscript
  1286. , list2<expr const &, typename result_of::as_child<A const>::type>
  1287. , 2
  1288. > that = {*this, proto::as_child(a)};
  1289. return that;
  1290. }
  1291. template<typename Sig>
  1292. struct result
  1293. {
  1294. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  1295. };
  1296. BOOST_FORCEINLINE
  1297. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  1298. operator ()() const
  1299. {
  1300. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  1301. return that;
  1302. }
  1303. template<typename A0>
  1304. BOOST_FORCEINLINE
  1305. typename result_of::funop1<
  1306. expr const
  1307. , default_domain , const A0
  1308. >::type const
  1309. operator ()(A0 const &a0) const
  1310. {
  1311. return result_of::funop1<
  1312. expr const
  1313. , default_domain , const A0
  1314. >::call(*this , a0);
  1315. }
  1316. template<typename A0 , typename A1>
  1317. BOOST_FORCEINLINE
  1318. typename result_of::funop2<
  1319. expr const
  1320. , default_domain , const A0 , const A1
  1321. >::type const
  1322. operator ()(A0 const &a0 , A1 const &a1) const
  1323. {
  1324. return result_of::funop2<
  1325. expr const
  1326. , default_domain , const A0 , const A1
  1327. >::call(*this , a0 , a1);
  1328. }
  1329. template<typename A0 , typename A1 , typename A2>
  1330. BOOST_FORCEINLINE
  1331. typename result_of::funop3<
  1332. expr const
  1333. , default_domain , const A0 , const A1 , const A2
  1334. >::type const
  1335. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  1336. {
  1337. return result_of::funop3<
  1338. expr const
  1339. , default_domain , const A0 , const A1 , const A2
  1340. >::call(*this , a0 , a1 , a2);
  1341. }
  1342. template<typename A0 , typename A1 , typename A2 , typename A3>
  1343. BOOST_FORCEINLINE
  1344. typename result_of::funop4<
  1345. expr const
  1346. , default_domain , const A0 , const A1 , const A2 , const A3
  1347. >::type const
  1348. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  1349. {
  1350. return result_of::funop4<
  1351. expr const
  1352. , default_domain , const A0 , const A1 , const A2 , const A3
  1353. >::call(*this , a0 , a1 , a2 , a3);
  1354. }
  1355. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  1356. BOOST_FORCEINLINE
  1357. typename result_of::funop5<
  1358. expr const
  1359. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  1360. >::type const
  1361. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  1362. {
  1363. return result_of::funop5<
  1364. expr const
  1365. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  1366. >::call(*this , a0 , a1 , a2 , a3 , a4);
  1367. }
  1368. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  1369. BOOST_FORCEINLINE
  1370. typename result_of::funop6<
  1371. expr const
  1372. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  1373. >::type const
  1374. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  1375. {
  1376. return result_of::funop6<
  1377. expr const
  1378. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  1379. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  1380. }
  1381. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  1382. BOOST_FORCEINLINE
  1383. typename result_of::funop7<
  1384. expr const
  1385. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  1386. >::type const
  1387. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  1388. {
  1389. return result_of::funop7<
  1390. expr const
  1391. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  1392. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  1393. }
  1394. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  1395. BOOST_FORCEINLINE
  1396. typename result_of::funop8<
  1397. expr const
  1398. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  1399. >::type const
  1400. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  1401. {
  1402. return result_of::funop8<
  1403. expr const
  1404. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  1405. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  1406. }
  1407. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  1408. BOOST_FORCEINLINE
  1409. typename result_of::funop9<
  1410. expr const
  1411. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  1412. >::type const
  1413. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  1414. {
  1415. return result_of::funop9<
  1416. expr const
  1417. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  1418. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  1419. }
  1420. };
  1421. template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4>
  1422. struct expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5 >
  1423. {
  1424. typedef Tag proto_tag;
  1425. static const long proto_arity_c = 5;
  1426. typedef mpl::long_<5 > proto_arity;
  1427. typedef expr proto_base_expr;
  1428. typedef list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4> proto_args;
  1429. typedef basic_expr<Tag, proto_args, 5 > proto_grammar;
  1430. typedef default_domain proto_domain;
  1431. typedef default_generator proto_generator;
  1432. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  1433. typedef expr proto_derived_expr;
  1434. typedef void proto_is_expr_;
  1435. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4;
  1436. typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
  1437. BOOST_FORCEINLINE
  1438. expr const &proto_base() const
  1439. {
  1440. return *this;
  1441. }
  1442. BOOST_FORCEINLINE
  1443. expr &proto_base()
  1444. {
  1445. return *this;
  1446. }
  1447. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  1448. BOOST_FORCEINLINE
  1449. static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4)
  1450. {
  1451. expr that = {a0 , a1 , a2 , a3 , a4};
  1452. return that;
  1453. }
  1454. typedef detail::not_a_valid_type address_of_hack_type_;
  1455. BOOST_FORCEINLINE
  1456. proto::expr<
  1457. proto::tag::assign
  1458. , list2<expr &, expr const &>
  1459. , 2
  1460. > const
  1461. operator =(expr const &a)
  1462. {
  1463. proto::expr<
  1464. proto::tag::assign
  1465. , list2<expr &, expr const &>
  1466. , 2
  1467. > that = {*this, a};
  1468. return that;
  1469. }
  1470. template<typename A>
  1471. BOOST_FORCEINLINE
  1472. proto::expr<
  1473. proto::tag::assign
  1474. , list2<expr const &, typename result_of::as_child<A>::type>
  1475. , 2
  1476. > const
  1477. operator =(A &a) const
  1478. {
  1479. proto::expr<
  1480. proto::tag::assign
  1481. , list2<expr const &, typename result_of::as_child<A>::type>
  1482. , 2
  1483. > that = {*this, proto::as_child(a)};
  1484. return that;
  1485. }
  1486. template<typename A>
  1487. BOOST_FORCEINLINE
  1488. proto::expr<
  1489. proto::tag::assign
  1490. , list2<expr const &, typename result_of::as_child<A const>::type>
  1491. , 2
  1492. > const
  1493. operator =(A const &a) const
  1494. {
  1495. proto::expr<
  1496. proto::tag::assign
  1497. , list2<expr const &, typename result_of::as_child<A const>::type>
  1498. , 2
  1499. > that = {*this, proto::as_child(a)};
  1500. return that;
  1501. }
  1502. template<typename A>
  1503. BOOST_FORCEINLINE
  1504. proto::expr<
  1505. proto::tag::subscript
  1506. , list2<expr const &, typename result_of::as_child<A>::type>
  1507. , 2
  1508. > const
  1509. operator [](A &a) const
  1510. {
  1511. proto::expr<
  1512. proto::tag::subscript
  1513. , list2<expr const &, typename result_of::as_child<A>::type>
  1514. , 2
  1515. > that = {*this, proto::as_child(a)};
  1516. return that;
  1517. }
  1518. template<typename A>
  1519. BOOST_FORCEINLINE
  1520. proto::expr<
  1521. proto::tag::subscript
  1522. , list2<expr const &, typename result_of::as_child<A const>::type>
  1523. , 2
  1524. > const
  1525. operator [](A const &a) const
  1526. {
  1527. proto::expr<
  1528. proto::tag::subscript
  1529. , list2<expr const &, typename result_of::as_child<A const>::type>
  1530. , 2
  1531. > that = {*this, proto::as_child(a)};
  1532. return that;
  1533. }
  1534. template<typename Sig>
  1535. struct result
  1536. {
  1537. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  1538. };
  1539. BOOST_FORCEINLINE
  1540. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  1541. operator ()() const
  1542. {
  1543. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  1544. return that;
  1545. }
  1546. template<typename A0>
  1547. BOOST_FORCEINLINE
  1548. typename result_of::funop1<
  1549. expr const
  1550. , default_domain , const A0
  1551. >::type const
  1552. operator ()(A0 const &a0) const
  1553. {
  1554. return result_of::funop1<
  1555. expr const
  1556. , default_domain , const A0
  1557. >::call(*this , a0);
  1558. }
  1559. template<typename A0 , typename A1>
  1560. BOOST_FORCEINLINE
  1561. typename result_of::funop2<
  1562. expr const
  1563. , default_domain , const A0 , const A1
  1564. >::type const
  1565. operator ()(A0 const &a0 , A1 const &a1) const
  1566. {
  1567. return result_of::funop2<
  1568. expr const
  1569. , default_domain , const A0 , const A1
  1570. >::call(*this , a0 , a1);
  1571. }
  1572. template<typename A0 , typename A1 , typename A2>
  1573. BOOST_FORCEINLINE
  1574. typename result_of::funop3<
  1575. expr const
  1576. , default_domain , const A0 , const A1 , const A2
  1577. >::type const
  1578. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  1579. {
  1580. return result_of::funop3<
  1581. expr const
  1582. , default_domain , const A0 , const A1 , const A2
  1583. >::call(*this , a0 , a1 , a2);
  1584. }
  1585. template<typename A0 , typename A1 , typename A2 , typename A3>
  1586. BOOST_FORCEINLINE
  1587. typename result_of::funop4<
  1588. expr const
  1589. , default_domain , const A0 , const A1 , const A2 , const A3
  1590. >::type const
  1591. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  1592. {
  1593. return result_of::funop4<
  1594. expr const
  1595. , default_domain , const A0 , const A1 , const A2 , const A3
  1596. >::call(*this , a0 , a1 , a2 , a3);
  1597. }
  1598. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  1599. BOOST_FORCEINLINE
  1600. typename result_of::funop5<
  1601. expr const
  1602. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  1603. >::type const
  1604. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  1605. {
  1606. return result_of::funop5<
  1607. expr const
  1608. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  1609. >::call(*this , a0 , a1 , a2 , a3 , a4);
  1610. }
  1611. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  1612. BOOST_FORCEINLINE
  1613. typename result_of::funop6<
  1614. expr const
  1615. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  1616. >::type const
  1617. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  1618. {
  1619. return result_of::funop6<
  1620. expr const
  1621. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  1622. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  1623. }
  1624. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  1625. BOOST_FORCEINLINE
  1626. typename result_of::funop7<
  1627. expr const
  1628. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  1629. >::type const
  1630. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  1631. {
  1632. return result_of::funop7<
  1633. expr const
  1634. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  1635. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  1636. }
  1637. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  1638. BOOST_FORCEINLINE
  1639. typename result_of::funop8<
  1640. expr const
  1641. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  1642. >::type const
  1643. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  1644. {
  1645. return result_of::funop8<
  1646. expr const
  1647. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  1648. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  1649. }
  1650. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  1651. BOOST_FORCEINLINE
  1652. typename result_of::funop9<
  1653. expr const
  1654. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  1655. >::type const
  1656. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  1657. {
  1658. return result_of::funop9<
  1659. expr const
  1660. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  1661. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  1662. }
  1663. };
  1664. template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5>
  1665. struct expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6 >
  1666. {
  1667. typedef Tag proto_tag;
  1668. static const long proto_arity_c = 6;
  1669. typedef mpl::long_<6 > proto_arity;
  1670. typedef expr proto_base_expr;
  1671. typedef list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5> proto_args;
  1672. typedef basic_expr<Tag, proto_args, 6 > proto_grammar;
  1673. typedef default_domain proto_domain;
  1674. typedef default_generator proto_generator;
  1675. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  1676. typedef expr proto_derived_expr;
  1677. typedef void proto_is_expr_;
  1678. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5;
  1679. typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
  1680. BOOST_FORCEINLINE
  1681. expr const &proto_base() const
  1682. {
  1683. return *this;
  1684. }
  1685. BOOST_FORCEINLINE
  1686. expr &proto_base()
  1687. {
  1688. return *this;
  1689. }
  1690. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  1691. BOOST_FORCEINLINE
  1692. static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5)
  1693. {
  1694. expr that = {a0 , a1 , a2 , a3 , a4 , a5};
  1695. return that;
  1696. }
  1697. typedef detail::not_a_valid_type address_of_hack_type_;
  1698. BOOST_FORCEINLINE
  1699. proto::expr<
  1700. proto::tag::assign
  1701. , list2<expr &, expr const &>
  1702. , 2
  1703. > const
  1704. operator =(expr const &a)
  1705. {
  1706. proto::expr<
  1707. proto::tag::assign
  1708. , list2<expr &, expr const &>
  1709. , 2
  1710. > that = {*this, a};
  1711. return that;
  1712. }
  1713. template<typename A>
  1714. BOOST_FORCEINLINE
  1715. proto::expr<
  1716. proto::tag::assign
  1717. , list2<expr const &, typename result_of::as_child<A>::type>
  1718. , 2
  1719. > const
  1720. operator =(A &a) const
  1721. {
  1722. proto::expr<
  1723. proto::tag::assign
  1724. , list2<expr const &, typename result_of::as_child<A>::type>
  1725. , 2
  1726. > that = {*this, proto::as_child(a)};
  1727. return that;
  1728. }
  1729. template<typename A>
  1730. BOOST_FORCEINLINE
  1731. proto::expr<
  1732. proto::tag::assign
  1733. , list2<expr const &, typename result_of::as_child<A const>::type>
  1734. , 2
  1735. > const
  1736. operator =(A const &a) const
  1737. {
  1738. proto::expr<
  1739. proto::tag::assign
  1740. , list2<expr const &, typename result_of::as_child<A const>::type>
  1741. , 2
  1742. > that = {*this, proto::as_child(a)};
  1743. return that;
  1744. }
  1745. template<typename A>
  1746. BOOST_FORCEINLINE
  1747. proto::expr<
  1748. proto::tag::subscript
  1749. , list2<expr const &, typename result_of::as_child<A>::type>
  1750. , 2
  1751. > const
  1752. operator [](A &a) const
  1753. {
  1754. proto::expr<
  1755. proto::tag::subscript
  1756. , list2<expr const &, typename result_of::as_child<A>::type>
  1757. , 2
  1758. > that = {*this, proto::as_child(a)};
  1759. return that;
  1760. }
  1761. template<typename A>
  1762. BOOST_FORCEINLINE
  1763. proto::expr<
  1764. proto::tag::subscript
  1765. , list2<expr const &, typename result_of::as_child<A const>::type>
  1766. , 2
  1767. > const
  1768. operator [](A const &a) const
  1769. {
  1770. proto::expr<
  1771. proto::tag::subscript
  1772. , list2<expr const &, typename result_of::as_child<A const>::type>
  1773. , 2
  1774. > that = {*this, proto::as_child(a)};
  1775. return that;
  1776. }
  1777. template<typename Sig>
  1778. struct result
  1779. {
  1780. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  1781. };
  1782. BOOST_FORCEINLINE
  1783. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  1784. operator ()() const
  1785. {
  1786. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  1787. return that;
  1788. }
  1789. template<typename A0>
  1790. BOOST_FORCEINLINE
  1791. typename result_of::funop1<
  1792. expr const
  1793. , default_domain , const A0
  1794. >::type const
  1795. operator ()(A0 const &a0) const
  1796. {
  1797. return result_of::funop1<
  1798. expr const
  1799. , default_domain , const A0
  1800. >::call(*this , a0);
  1801. }
  1802. template<typename A0 , typename A1>
  1803. BOOST_FORCEINLINE
  1804. typename result_of::funop2<
  1805. expr const
  1806. , default_domain , const A0 , const A1
  1807. >::type const
  1808. operator ()(A0 const &a0 , A1 const &a1) const
  1809. {
  1810. return result_of::funop2<
  1811. expr const
  1812. , default_domain , const A0 , const A1
  1813. >::call(*this , a0 , a1);
  1814. }
  1815. template<typename A0 , typename A1 , typename A2>
  1816. BOOST_FORCEINLINE
  1817. typename result_of::funop3<
  1818. expr const
  1819. , default_domain , const A0 , const A1 , const A2
  1820. >::type const
  1821. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  1822. {
  1823. return result_of::funop3<
  1824. expr const
  1825. , default_domain , const A0 , const A1 , const A2
  1826. >::call(*this , a0 , a1 , a2);
  1827. }
  1828. template<typename A0 , typename A1 , typename A2 , typename A3>
  1829. BOOST_FORCEINLINE
  1830. typename result_of::funop4<
  1831. expr const
  1832. , default_domain , const A0 , const A1 , const A2 , const A3
  1833. >::type const
  1834. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  1835. {
  1836. return result_of::funop4<
  1837. expr const
  1838. , default_domain , const A0 , const A1 , const A2 , const A3
  1839. >::call(*this , a0 , a1 , a2 , a3);
  1840. }
  1841. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  1842. BOOST_FORCEINLINE
  1843. typename result_of::funop5<
  1844. expr const
  1845. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  1846. >::type const
  1847. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  1848. {
  1849. return result_of::funop5<
  1850. expr const
  1851. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  1852. >::call(*this , a0 , a1 , a2 , a3 , a4);
  1853. }
  1854. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  1855. BOOST_FORCEINLINE
  1856. typename result_of::funop6<
  1857. expr const
  1858. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  1859. >::type const
  1860. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  1861. {
  1862. return result_of::funop6<
  1863. expr const
  1864. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  1865. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  1866. }
  1867. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  1868. BOOST_FORCEINLINE
  1869. typename result_of::funop7<
  1870. expr const
  1871. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  1872. >::type const
  1873. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  1874. {
  1875. return result_of::funop7<
  1876. expr const
  1877. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  1878. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  1879. }
  1880. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  1881. BOOST_FORCEINLINE
  1882. typename result_of::funop8<
  1883. expr const
  1884. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  1885. >::type const
  1886. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  1887. {
  1888. return result_of::funop8<
  1889. expr const
  1890. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  1891. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  1892. }
  1893. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  1894. BOOST_FORCEINLINE
  1895. typename result_of::funop9<
  1896. expr const
  1897. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  1898. >::type const
  1899. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  1900. {
  1901. return result_of::funop9<
  1902. expr const
  1903. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  1904. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  1905. }
  1906. };
  1907. template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6>
  1908. struct expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7 >
  1909. {
  1910. typedef Tag proto_tag;
  1911. static const long proto_arity_c = 7;
  1912. typedef mpl::long_<7 > proto_arity;
  1913. typedef expr proto_base_expr;
  1914. typedef list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6> proto_args;
  1915. typedef basic_expr<Tag, proto_args, 7 > proto_grammar;
  1916. typedef default_domain proto_domain;
  1917. typedef default_generator proto_generator;
  1918. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  1919. typedef expr proto_derived_expr;
  1920. typedef void proto_is_expr_;
  1921. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6;
  1922. typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
  1923. BOOST_FORCEINLINE
  1924. expr const &proto_base() const
  1925. {
  1926. return *this;
  1927. }
  1928. BOOST_FORCEINLINE
  1929. expr &proto_base()
  1930. {
  1931. return *this;
  1932. }
  1933. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  1934. BOOST_FORCEINLINE
  1935. static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6)
  1936. {
  1937. expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6};
  1938. return that;
  1939. }
  1940. typedef detail::not_a_valid_type address_of_hack_type_;
  1941. BOOST_FORCEINLINE
  1942. proto::expr<
  1943. proto::tag::assign
  1944. , list2<expr &, expr const &>
  1945. , 2
  1946. > const
  1947. operator =(expr const &a)
  1948. {
  1949. proto::expr<
  1950. proto::tag::assign
  1951. , list2<expr &, expr const &>
  1952. , 2
  1953. > that = {*this, a};
  1954. return that;
  1955. }
  1956. template<typename A>
  1957. BOOST_FORCEINLINE
  1958. proto::expr<
  1959. proto::tag::assign
  1960. , list2<expr const &, typename result_of::as_child<A>::type>
  1961. , 2
  1962. > const
  1963. operator =(A &a) const
  1964. {
  1965. proto::expr<
  1966. proto::tag::assign
  1967. , list2<expr const &, typename result_of::as_child<A>::type>
  1968. , 2
  1969. > that = {*this, proto::as_child(a)};
  1970. return that;
  1971. }
  1972. template<typename A>
  1973. BOOST_FORCEINLINE
  1974. proto::expr<
  1975. proto::tag::assign
  1976. , list2<expr const &, typename result_of::as_child<A const>::type>
  1977. , 2
  1978. > const
  1979. operator =(A const &a) const
  1980. {
  1981. proto::expr<
  1982. proto::tag::assign
  1983. , list2<expr const &, typename result_of::as_child<A const>::type>
  1984. , 2
  1985. > that = {*this, proto::as_child(a)};
  1986. return that;
  1987. }
  1988. template<typename A>
  1989. BOOST_FORCEINLINE
  1990. proto::expr<
  1991. proto::tag::subscript
  1992. , list2<expr const &, typename result_of::as_child<A>::type>
  1993. , 2
  1994. > const
  1995. operator [](A &a) const
  1996. {
  1997. proto::expr<
  1998. proto::tag::subscript
  1999. , list2<expr const &, typename result_of::as_child<A>::type>
  2000. , 2
  2001. > that = {*this, proto::as_child(a)};
  2002. return that;
  2003. }
  2004. template<typename A>
  2005. BOOST_FORCEINLINE
  2006. proto::expr<
  2007. proto::tag::subscript
  2008. , list2<expr const &, typename result_of::as_child<A const>::type>
  2009. , 2
  2010. > const
  2011. operator [](A const &a) const
  2012. {
  2013. proto::expr<
  2014. proto::tag::subscript
  2015. , list2<expr const &, typename result_of::as_child<A const>::type>
  2016. , 2
  2017. > that = {*this, proto::as_child(a)};
  2018. return that;
  2019. }
  2020. template<typename Sig>
  2021. struct result
  2022. {
  2023. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  2024. };
  2025. BOOST_FORCEINLINE
  2026. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  2027. operator ()() const
  2028. {
  2029. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  2030. return that;
  2031. }
  2032. template<typename A0>
  2033. BOOST_FORCEINLINE
  2034. typename result_of::funop1<
  2035. expr const
  2036. , default_domain , const A0
  2037. >::type const
  2038. operator ()(A0 const &a0) const
  2039. {
  2040. return result_of::funop1<
  2041. expr const
  2042. , default_domain , const A0
  2043. >::call(*this , a0);
  2044. }
  2045. template<typename A0 , typename A1>
  2046. BOOST_FORCEINLINE
  2047. typename result_of::funop2<
  2048. expr const
  2049. , default_domain , const A0 , const A1
  2050. >::type const
  2051. operator ()(A0 const &a0 , A1 const &a1) const
  2052. {
  2053. return result_of::funop2<
  2054. expr const
  2055. , default_domain , const A0 , const A1
  2056. >::call(*this , a0 , a1);
  2057. }
  2058. template<typename A0 , typename A1 , typename A2>
  2059. BOOST_FORCEINLINE
  2060. typename result_of::funop3<
  2061. expr const
  2062. , default_domain , const A0 , const A1 , const A2
  2063. >::type const
  2064. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  2065. {
  2066. return result_of::funop3<
  2067. expr const
  2068. , default_domain , const A0 , const A1 , const A2
  2069. >::call(*this , a0 , a1 , a2);
  2070. }
  2071. template<typename A0 , typename A1 , typename A2 , typename A3>
  2072. BOOST_FORCEINLINE
  2073. typename result_of::funop4<
  2074. expr const
  2075. , default_domain , const A0 , const A1 , const A2 , const A3
  2076. >::type const
  2077. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  2078. {
  2079. return result_of::funop4<
  2080. expr const
  2081. , default_domain , const A0 , const A1 , const A2 , const A3
  2082. >::call(*this , a0 , a1 , a2 , a3);
  2083. }
  2084. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  2085. BOOST_FORCEINLINE
  2086. typename result_of::funop5<
  2087. expr const
  2088. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  2089. >::type const
  2090. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  2091. {
  2092. return result_of::funop5<
  2093. expr const
  2094. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  2095. >::call(*this , a0 , a1 , a2 , a3 , a4);
  2096. }
  2097. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  2098. BOOST_FORCEINLINE
  2099. typename result_of::funop6<
  2100. expr const
  2101. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  2102. >::type const
  2103. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  2104. {
  2105. return result_of::funop6<
  2106. expr const
  2107. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  2108. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  2109. }
  2110. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  2111. BOOST_FORCEINLINE
  2112. typename result_of::funop7<
  2113. expr const
  2114. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  2115. >::type const
  2116. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  2117. {
  2118. return result_of::funop7<
  2119. expr const
  2120. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  2121. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  2122. }
  2123. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  2124. BOOST_FORCEINLINE
  2125. typename result_of::funop8<
  2126. expr const
  2127. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  2128. >::type const
  2129. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  2130. {
  2131. return result_of::funop8<
  2132. expr const
  2133. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  2134. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  2135. }
  2136. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  2137. BOOST_FORCEINLINE
  2138. typename result_of::funop9<
  2139. expr const
  2140. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  2141. >::type const
  2142. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  2143. {
  2144. return result_of::funop9<
  2145. expr const
  2146. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  2147. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  2148. }
  2149. };
  2150. template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7>
  2151. struct expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8 >
  2152. {
  2153. typedef Tag proto_tag;
  2154. static const long proto_arity_c = 8;
  2155. typedef mpl::long_<8 > proto_arity;
  2156. typedef expr proto_base_expr;
  2157. typedef list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7> proto_args;
  2158. typedef basic_expr<Tag, proto_args, 8 > proto_grammar;
  2159. typedef default_domain proto_domain;
  2160. typedef default_generator proto_generator;
  2161. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  2162. typedef expr proto_derived_expr;
  2163. typedef void proto_is_expr_;
  2164. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7;
  2165. typedef void proto_child8; typedef void proto_child9;
  2166. BOOST_FORCEINLINE
  2167. expr const &proto_base() const
  2168. {
  2169. return *this;
  2170. }
  2171. BOOST_FORCEINLINE
  2172. expr &proto_base()
  2173. {
  2174. return *this;
  2175. }
  2176. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  2177. BOOST_FORCEINLINE
  2178. static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7)
  2179. {
  2180. expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7};
  2181. return that;
  2182. }
  2183. typedef detail::not_a_valid_type address_of_hack_type_;
  2184. BOOST_FORCEINLINE
  2185. proto::expr<
  2186. proto::tag::assign
  2187. , list2<expr &, expr const &>
  2188. , 2
  2189. > const
  2190. operator =(expr const &a)
  2191. {
  2192. proto::expr<
  2193. proto::tag::assign
  2194. , list2<expr &, expr const &>
  2195. , 2
  2196. > that = {*this, a};
  2197. return that;
  2198. }
  2199. template<typename A>
  2200. BOOST_FORCEINLINE
  2201. proto::expr<
  2202. proto::tag::assign
  2203. , list2<expr const &, typename result_of::as_child<A>::type>
  2204. , 2
  2205. > const
  2206. operator =(A &a) const
  2207. {
  2208. proto::expr<
  2209. proto::tag::assign
  2210. , list2<expr const &, typename result_of::as_child<A>::type>
  2211. , 2
  2212. > that = {*this, proto::as_child(a)};
  2213. return that;
  2214. }
  2215. template<typename A>
  2216. BOOST_FORCEINLINE
  2217. proto::expr<
  2218. proto::tag::assign
  2219. , list2<expr const &, typename result_of::as_child<A const>::type>
  2220. , 2
  2221. > const
  2222. operator =(A const &a) const
  2223. {
  2224. proto::expr<
  2225. proto::tag::assign
  2226. , list2<expr const &, typename result_of::as_child<A const>::type>
  2227. , 2
  2228. > that = {*this, proto::as_child(a)};
  2229. return that;
  2230. }
  2231. template<typename A>
  2232. BOOST_FORCEINLINE
  2233. proto::expr<
  2234. proto::tag::subscript
  2235. , list2<expr const &, typename result_of::as_child<A>::type>
  2236. , 2
  2237. > const
  2238. operator [](A &a) const
  2239. {
  2240. proto::expr<
  2241. proto::tag::subscript
  2242. , list2<expr const &, typename result_of::as_child<A>::type>
  2243. , 2
  2244. > that = {*this, proto::as_child(a)};
  2245. return that;
  2246. }
  2247. template<typename A>
  2248. BOOST_FORCEINLINE
  2249. proto::expr<
  2250. proto::tag::subscript
  2251. , list2<expr const &, typename result_of::as_child<A const>::type>
  2252. , 2
  2253. > const
  2254. operator [](A const &a) const
  2255. {
  2256. proto::expr<
  2257. proto::tag::subscript
  2258. , list2<expr const &, typename result_of::as_child<A const>::type>
  2259. , 2
  2260. > that = {*this, proto::as_child(a)};
  2261. return that;
  2262. }
  2263. template<typename Sig>
  2264. struct result
  2265. {
  2266. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  2267. };
  2268. BOOST_FORCEINLINE
  2269. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  2270. operator ()() const
  2271. {
  2272. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  2273. return that;
  2274. }
  2275. template<typename A0>
  2276. BOOST_FORCEINLINE
  2277. typename result_of::funop1<
  2278. expr const
  2279. , default_domain , const A0
  2280. >::type const
  2281. operator ()(A0 const &a0) const
  2282. {
  2283. return result_of::funop1<
  2284. expr const
  2285. , default_domain , const A0
  2286. >::call(*this , a0);
  2287. }
  2288. template<typename A0 , typename A1>
  2289. BOOST_FORCEINLINE
  2290. typename result_of::funop2<
  2291. expr const
  2292. , default_domain , const A0 , const A1
  2293. >::type const
  2294. operator ()(A0 const &a0 , A1 const &a1) const
  2295. {
  2296. return result_of::funop2<
  2297. expr const
  2298. , default_domain , const A0 , const A1
  2299. >::call(*this , a0 , a1);
  2300. }
  2301. template<typename A0 , typename A1 , typename A2>
  2302. BOOST_FORCEINLINE
  2303. typename result_of::funop3<
  2304. expr const
  2305. , default_domain , const A0 , const A1 , const A2
  2306. >::type const
  2307. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  2308. {
  2309. return result_of::funop3<
  2310. expr const
  2311. , default_domain , const A0 , const A1 , const A2
  2312. >::call(*this , a0 , a1 , a2);
  2313. }
  2314. template<typename A0 , typename A1 , typename A2 , typename A3>
  2315. BOOST_FORCEINLINE
  2316. typename result_of::funop4<
  2317. expr const
  2318. , default_domain , const A0 , const A1 , const A2 , const A3
  2319. >::type const
  2320. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  2321. {
  2322. return result_of::funop4<
  2323. expr const
  2324. , default_domain , const A0 , const A1 , const A2 , const A3
  2325. >::call(*this , a0 , a1 , a2 , a3);
  2326. }
  2327. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  2328. BOOST_FORCEINLINE
  2329. typename result_of::funop5<
  2330. expr const
  2331. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  2332. >::type const
  2333. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  2334. {
  2335. return result_of::funop5<
  2336. expr const
  2337. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  2338. >::call(*this , a0 , a1 , a2 , a3 , a4);
  2339. }
  2340. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  2341. BOOST_FORCEINLINE
  2342. typename result_of::funop6<
  2343. expr const
  2344. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  2345. >::type const
  2346. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  2347. {
  2348. return result_of::funop6<
  2349. expr const
  2350. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  2351. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  2352. }
  2353. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  2354. BOOST_FORCEINLINE
  2355. typename result_of::funop7<
  2356. expr const
  2357. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  2358. >::type const
  2359. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  2360. {
  2361. return result_of::funop7<
  2362. expr const
  2363. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  2364. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  2365. }
  2366. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  2367. BOOST_FORCEINLINE
  2368. typename result_of::funop8<
  2369. expr const
  2370. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  2371. >::type const
  2372. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  2373. {
  2374. return result_of::funop8<
  2375. expr const
  2376. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  2377. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  2378. }
  2379. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  2380. BOOST_FORCEINLINE
  2381. typename result_of::funop9<
  2382. expr const
  2383. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  2384. >::type const
  2385. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  2386. {
  2387. return result_of::funop9<
  2388. expr const
  2389. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  2390. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  2391. }
  2392. };
  2393. template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8>
  2394. struct expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9 >
  2395. {
  2396. typedef Tag proto_tag;
  2397. static const long proto_arity_c = 9;
  2398. typedef mpl::long_<9 > proto_arity;
  2399. typedef expr proto_base_expr;
  2400. typedef list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8> proto_args;
  2401. typedef basic_expr<Tag, proto_args, 9 > proto_grammar;
  2402. typedef default_domain proto_domain;
  2403. typedef default_generator proto_generator;
  2404. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  2405. typedef expr proto_derived_expr;
  2406. typedef void proto_is_expr_;
  2407. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8;
  2408. typedef void proto_child9;
  2409. BOOST_FORCEINLINE
  2410. expr const &proto_base() const
  2411. {
  2412. return *this;
  2413. }
  2414. BOOST_FORCEINLINE
  2415. expr &proto_base()
  2416. {
  2417. return *this;
  2418. }
  2419. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  2420. BOOST_FORCEINLINE
  2421. static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8)
  2422. {
  2423. expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8};
  2424. return that;
  2425. }
  2426. typedef detail::not_a_valid_type address_of_hack_type_;
  2427. BOOST_FORCEINLINE
  2428. proto::expr<
  2429. proto::tag::assign
  2430. , list2<expr &, expr const &>
  2431. , 2
  2432. > const
  2433. operator =(expr const &a)
  2434. {
  2435. proto::expr<
  2436. proto::tag::assign
  2437. , list2<expr &, expr const &>
  2438. , 2
  2439. > that = {*this, a};
  2440. return that;
  2441. }
  2442. template<typename A>
  2443. BOOST_FORCEINLINE
  2444. proto::expr<
  2445. proto::tag::assign
  2446. , list2<expr const &, typename result_of::as_child<A>::type>
  2447. , 2
  2448. > const
  2449. operator =(A &a) const
  2450. {
  2451. proto::expr<
  2452. proto::tag::assign
  2453. , list2<expr const &, typename result_of::as_child<A>::type>
  2454. , 2
  2455. > that = {*this, proto::as_child(a)};
  2456. return that;
  2457. }
  2458. template<typename A>
  2459. BOOST_FORCEINLINE
  2460. proto::expr<
  2461. proto::tag::assign
  2462. , list2<expr const &, typename result_of::as_child<A const>::type>
  2463. , 2
  2464. > const
  2465. operator =(A const &a) const
  2466. {
  2467. proto::expr<
  2468. proto::tag::assign
  2469. , list2<expr const &, typename result_of::as_child<A const>::type>
  2470. , 2
  2471. > that = {*this, proto::as_child(a)};
  2472. return that;
  2473. }
  2474. template<typename A>
  2475. BOOST_FORCEINLINE
  2476. proto::expr<
  2477. proto::tag::subscript
  2478. , list2<expr const &, typename result_of::as_child<A>::type>
  2479. , 2
  2480. > const
  2481. operator [](A &a) const
  2482. {
  2483. proto::expr<
  2484. proto::tag::subscript
  2485. , list2<expr const &, typename result_of::as_child<A>::type>
  2486. , 2
  2487. > that = {*this, proto::as_child(a)};
  2488. return that;
  2489. }
  2490. template<typename A>
  2491. BOOST_FORCEINLINE
  2492. proto::expr<
  2493. proto::tag::subscript
  2494. , list2<expr const &, typename result_of::as_child<A const>::type>
  2495. , 2
  2496. > const
  2497. operator [](A const &a) const
  2498. {
  2499. proto::expr<
  2500. proto::tag::subscript
  2501. , list2<expr const &, typename result_of::as_child<A const>::type>
  2502. , 2
  2503. > that = {*this, proto::as_child(a)};
  2504. return that;
  2505. }
  2506. template<typename Sig>
  2507. struct result
  2508. {
  2509. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  2510. };
  2511. BOOST_FORCEINLINE
  2512. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  2513. operator ()() const
  2514. {
  2515. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  2516. return that;
  2517. }
  2518. template<typename A0>
  2519. BOOST_FORCEINLINE
  2520. typename result_of::funop1<
  2521. expr const
  2522. , default_domain , const A0
  2523. >::type const
  2524. operator ()(A0 const &a0) const
  2525. {
  2526. return result_of::funop1<
  2527. expr const
  2528. , default_domain , const A0
  2529. >::call(*this , a0);
  2530. }
  2531. template<typename A0 , typename A1>
  2532. BOOST_FORCEINLINE
  2533. typename result_of::funop2<
  2534. expr const
  2535. , default_domain , const A0 , const A1
  2536. >::type const
  2537. operator ()(A0 const &a0 , A1 const &a1) const
  2538. {
  2539. return result_of::funop2<
  2540. expr const
  2541. , default_domain , const A0 , const A1
  2542. >::call(*this , a0 , a1);
  2543. }
  2544. template<typename A0 , typename A1 , typename A2>
  2545. BOOST_FORCEINLINE
  2546. typename result_of::funop3<
  2547. expr const
  2548. , default_domain , const A0 , const A1 , const A2
  2549. >::type const
  2550. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  2551. {
  2552. return result_of::funop3<
  2553. expr const
  2554. , default_domain , const A0 , const A1 , const A2
  2555. >::call(*this , a0 , a1 , a2);
  2556. }
  2557. template<typename A0 , typename A1 , typename A2 , typename A3>
  2558. BOOST_FORCEINLINE
  2559. typename result_of::funop4<
  2560. expr const
  2561. , default_domain , const A0 , const A1 , const A2 , const A3
  2562. >::type const
  2563. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  2564. {
  2565. return result_of::funop4<
  2566. expr const
  2567. , default_domain , const A0 , const A1 , const A2 , const A3
  2568. >::call(*this , a0 , a1 , a2 , a3);
  2569. }
  2570. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  2571. BOOST_FORCEINLINE
  2572. typename result_of::funop5<
  2573. expr const
  2574. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  2575. >::type const
  2576. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  2577. {
  2578. return result_of::funop5<
  2579. expr const
  2580. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  2581. >::call(*this , a0 , a1 , a2 , a3 , a4);
  2582. }
  2583. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  2584. BOOST_FORCEINLINE
  2585. typename result_of::funop6<
  2586. expr const
  2587. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  2588. >::type const
  2589. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  2590. {
  2591. return result_of::funop6<
  2592. expr const
  2593. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  2594. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  2595. }
  2596. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  2597. BOOST_FORCEINLINE
  2598. typename result_of::funop7<
  2599. expr const
  2600. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  2601. >::type const
  2602. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  2603. {
  2604. return result_of::funop7<
  2605. expr const
  2606. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  2607. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  2608. }
  2609. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  2610. BOOST_FORCEINLINE
  2611. typename result_of::funop8<
  2612. expr const
  2613. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  2614. >::type const
  2615. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  2616. {
  2617. return result_of::funop8<
  2618. expr const
  2619. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  2620. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  2621. }
  2622. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  2623. BOOST_FORCEINLINE
  2624. typename result_of::funop9<
  2625. expr const
  2626. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  2627. >::type const
  2628. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  2629. {
  2630. return result_of::funop9<
  2631. expr const
  2632. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  2633. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  2634. }
  2635. };
  2636. template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9>
  2637. struct expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10 >
  2638. {
  2639. typedef Tag proto_tag;
  2640. static const long proto_arity_c = 10;
  2641. typedef mpl::long_<10 > proto_arity;
  2642. typedef expr proto_base_expr;
  2643. typedef list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9> proto_args;
  2644. typedef basic_expr<Tag, proto_args, 10 > proto_grammar;
  2645. typedef default_domain proto_domain;
  2646. typedef default_generator proto_generator;
  2647. typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag;
  2648. typedef expr proto_derived_expr;
  2649. typedef void proto_is_expr_;
  2650. typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8; typedef Arg9 proto_child9; proto_child9 child9;
  2651. BOOST_FORCEINLINE
  2652. expr const &proto_base() const
  2653. {
  2654. return *this;
  2655. }
  2656. BOOST_FORCEINLINE
  2657. expr &proto_base()
  2658. {
  2659. return *this;
  2660. }
  2661. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
  2662. BOOST_FORCEINLINE
  2663. static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8 , A9 const &a9)
  2664. {
  2665. expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9};
  2666. return that;
  2667. }
  2668. typedef detail::not_a_valid_type address_of_hack_type_;
  2669. BOOST_FORCEINLINE
  2670. proto::expr<
  2671. proto::tag::assign
  2672. , list2<expr &, expr const &>
  2673. , 2
  2674. > const
  2675. operator =(expr const &a)
  2676. {
  2677. proto::expr<
  2678. proto::tag::assign
  2679. , list2<expr &, expr const &>
  2680. , 2
  2681. > that = {*this, a};
  2682. return that;
  2683. }
  2684. template<typename A>
  2685. BOOST_FORCEINLINE
  2686. proto::expr<
  2687. proto::tag::assign
  2688. , list2<expr const &, typename result_of::as_child<A>::type>
  2689. , 2
  2690. > const
  2691. operator =(A &a) const
  2692. {
  2693. proto::expr<
  2694. proto::tag::assign
  2695. , list2<expr const &, typename result_of::as_child<A>::type>
  2696. , 2
  2697. > that = {*this, proto::as_child(a)};
  2698. return that;
  2699. }
  2700. template<typename A>
  2701. BOOST_FORCEINLINE
  2702. proto::expr<
  2703. proto::tag::assign
  2704. , list2<expr const &, typename result_of::as_child<A const>::type>
  2705. , 2
  2706. > const
  2707. operator =(A const &a) const
  2708. {
  2709. proto::expr<
  2710. proto::tag::assign
  2711. , list2<expr const &, typename result_of::as_child<A const>::type>
  2712. , 2
  2713. > that = {*this, proto::as_child(a)};
  2714. return that;
  2715. }
  2716. template<typename A>
  2717. BOOST_FORCEINLINE
  2718. proto::expr<
  2719. proto::tag::subscript
  2720. , list2<expr const &, typename result_of::as_child<A>::type>
  2721. , 2
  2722. > const
  2723. operator [](A &a) const
  2724. {
  2725. proto::expr<
  2726. proto::tag::subscript
  2727. , list2<expr const &, typename result_of::as_child<A>::type>
  2728. , 2
  2729. > that = {*this, proto::as_child(a)};
  2730. return that;
  2731. }
  2732. template<typename A>
  2733. BOOST_FORCEINLINE
  2734. proto::expr<
  2735. proto::tag::subscript
  2736. , list2<expr const &, typename result_of::as_child<A const>::type>
  2737. , 2
  2738. > const
  2739. operator [](A const &a) const
  2740. {
  2741. proto::expr<
  2742. proto::tag::subscript
  2743. , list2<expr const &, typename result_of::as_child<A const>::type>
  2744. , 2
  2745. > that = {*this, proto::as_child(a)};
  2746. return that;
  2747. }
  2748. template<typename Sig>
  2749. struct result
  2750. {
  2751. typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
  2752. };
  2753. BOOST_FORCEINLINE
  2754. proto::expr<proto::tag::function, list1<expr const &>, 1> const
  2755. operator ()() const
  2756. {
  2757. proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
  2758. return that;
  2759. }
  2760. template<typename A0>
  2761. BOOST_FORCEINLINE
  2762. typename result_of::funop1<
  2763. expr const
  2764. , default_domain , const A0
  2765. >::type const
  2766. operator ()(A0 const &a0) const
  2767. {
  2768. return result_of::funop1<
  2769. expr const
  2770. , default_domain , const A0
  2771. >::call(*this , a0);
  2772. }
  2773. template<typename A0 , typename A1>
  2774. BOOST_FORCEINLINE
  2775. typename result_of::funop2<
  2776. expr const
  2777. , default_domain , const A0 , const A1
  2778. >::type const
  2779. operator ()(A0 const &a0 , A1 const &a1) const
  2780. {
  2781. return result_of::funop2<
  2782. expr const
  2783. , default_domain , const A0 , const A1
  2784. >::call(*this , a0 , a1);
  2785. }
  2786. template<typename A0 , typename A1 , typename A2>
  2787. BOOST_FORCEINLINE
  2788. typename result_of::funop3<
  2789. expr const
  2790. , default_domain , const A0 , const A1 , const A2
  2791. >::type const
  2792. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
  2793. {
  2794. return result_of::funop3<
  2795. expr const
  2796. , default_domain , const A0 , const A1 , const A2
  2797. >::call(*this , a0 , a1 , a2);
  2798. }
  2799. template<typename A0 , typename A1 , typename A2 , typename A3>
  2800. BOOST_FORCEINLINE
  2801. typename result_of::funop4<
  2802. expr const
  2803. , default_domain , const A0 , const A1 , const A2 , const A3
  2804. >::type const
  2805. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
  2806. {
  2807. return result_of::funop4<
  2808. expr const
  2809. , default_domain , const A0 , const A1 , const A2 , const A3
  2810. >::call(*this , a0 , a1 , a2 , a3);
  2811. }
  2812. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  2813. BOOST_FORCEINLINE
  2814. typename result_of::funop5<
  2815. expr const
  2816. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  2817. >::type const
  2818. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
  2819. {
  2820. return result_of::funop5<
  2821. expr const
  2822. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
  2823. >::call(*this , a0 , a1 , a2 , a3 , a4);
  2824. }
  2825. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  2826. BOOST_FORCEINLINE
  2827. typename result_of::funop6<
  2828. expr const
  2829. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  2830. >::type const
  2831. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
  2832. {
  2833. return result_of::funop6<
  2834. expr const
  2835. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
  2836. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
  2837. }
  2838. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  2839. BOOST_FORCEINLINE
  2840. typename result_of::funop7<
  2841. expr const
  2842. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  2843. >::type const
  2844. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
  2845. {
  2846. return result_of::funop7<
  2847. expr const
  2848. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
  2849. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
  2850. }
  2851. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  2852. BOOST_FORCEINLINE
  2853. typename result_of::funop8<
  2854. expr const
  2855. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  2856. >::type const
  2857. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
  2858. {
  2859. return result_of::funop8<
  2860. expr const
  2861. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
  2862. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
  2863. }
  2864. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  2865. BOOST_FORCEINLINE
  2866. typename result_of::funop9<
  2867. expr const
  2868. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  2869. >::type const
  2870. operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
  2871. {
  2872. return result_of::funop9<
  2873. expr const
  2874. , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
  2875. >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
  2876. }
  2877. };