ivl 679
ivl/details/core/keyword_operators/lvalue.hpp
00001 /* This file is part of the ivl C++ library <http://image.ntua.gr/ivl>.
00002    A C++ template library extending syntax towards mathematical notation.
00003 
00004    Copyright (C) 2012 Yannis Avrithis <iavr@image.ntua.gr>
00005    Copyright (C) 2012 Kimon Kontosis <kimonas@image.ntua.gr>
00006 
00007    ivl is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU Lesser General Public License 
00009    version 3 as published by the Free Software Foundation.
00010 
00011    Alternatively, you can redistribute it and/or modify it under the terms 
00012    of the GNU General Public License version 2 as published by the Free 
00013    Software Foundation.
00014 
00015    ivl is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00018    See the GNU General Public License for more details.
00019 
00020    You should have received a copy of the GNU General Public License 
00021    and a copy of the GNU Lesser General Public License along 
00022    with ivl. If not, see <http://www.gnu.org/licenses/>. */
00023 
00024 #ifndef IVL_CORE_DETAILS_LVALUE_HPP
00025 #define IVL_CORE_DETAILS_LVALUE_HPP
00026 
00027 #if 0
00028 namespace ivl {
00029 
00030 namespace lvalue_details {
00031 
00032 template <class T>
00033 struct arg
00034 {
00035         typedef T type;
00036 };
00037 
00038 template <class T>
00039 struct arg<T&>
00040 {
00041         typedef T& type;
00042 };
00043 
00044 template <class T, class REFERER>
00045 struct const_arg
00046 {
00047 };
00048 
00049 template <class T>
00050 struct const_arg<T, types::t_true>
00051 {
00052         typename types::derive<T>::type type;
00053 };
00054 
00055 template <class T>
00056 struct arg<const T&>
00057 : public const_arg<T,
00058         typename types::is_base<types::array_is_referer_identifier, T>::type>
00059 {
00060 };
00061 
00062 template<
00063         typename T1 = types::skip, typename T2 = types::skip,
00064         typename T3 = types::skip, typename T4 = types::skip,
00065         typename T5 = types::skip, typename T6 = types::skip,
00066         typename T7 = types::skip, typename T8 = types::skip,
00067         typename T9 = types::skip, typename T10 = types::skip>
00068 class lvalue_base : public internal::tuple<
00069         typename arg<T1>::type,
00070         typename arg<T2>::type,
00071         typename arg<T3>::type,
00072         typename arg<T4>::type,
00073         typename arg<T5>::type,
00074         typename arg<T6>::type,
00075         typename arg<T7>::type,
00076         typename arg<T8>::type,
00077         typename arg<T9>::type,
00078         typename arg<T10>::type>
00079 {
00080         typedef internal::tuple<
00081         typename arg<T1>::type,
00082         typename arg<T2>::type,
00083         typename arg<T3>::type,
00084         typename arg<T4>::type,
00085         typename arg<T5>::type,
00086         typename arg<T6>::type,
00087         typename arg<T7>::type,
00088         typename arg<T8>::type,
00089         typename arg<T9>::type,
00090         typename arg<T10>::type> tpl;
00091 
00092         typedef typename types::bare_type<T1>::type b1;
00093         typedef typename types::bare_type<T2>::type b2;
00094         typedef typename types::bare_type<T3>::type b3;
00095         typedef typename types::bare_type<T4>::type b4;
00096         typedef typename types::bare_type<T5>::type b5;
00097         typedef typename types::bare_type<T6>::type b6;
00098         typedef typename types::bare_type<T7>::type b7;
00099         typedef typename types::bare_type<T8>::type b8;
00100         typedef typename types::bare_type<T9>::type b9;
00101         typedef typename types::bare_type<T10>::type b10;
00102 
00103 public:
00104         lvalue_base(T1 arg1 = b1(), T2 arg2 = b2(), T3 arg3 = b3(),
00105                 T4 arg4 = b4(), T5 arg5 = b5(), T6 arg6 = b6(), T7 arg7 = b7(),
00106                 T8 arg8 = b8(), T9 arg9 = b9(), T10 arg10 = b10()) :
00107                 tpl(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {};
00108 
00109         //using tpl::operator=;
00110 
00111         template<int N, class TPL>
00112         lvalue_base& operator=(const ivl::internal::tuple_base<N, TPL>& t)
00113         {
00114                 tpl::operator=(t);
00115                 return *this;
00116         }
00117 
00118         template <class F>
00119         lvalue_base& operator=(const rvalue_base<F>& f)
00120         {
00121                 internal::apply_tuple_output(*this, f.derived());
00122                 return *this;
00123         }
00124 };
00125 
00126 // -------------------------------------------------------------------------
00127 // lval_base is for operator _(.)
00128 template<
00129         typename T1 = types::skip, typename T2 = types::skip,
00130         typename T3 = types::skip, typename T4 = types::skip,
00131         typename T5 = types::skip, typename T6 = types::skip,
00132         typename T7 = types::skip, typename T8 = types::skip,
00133         typename T9 = types::skip, typename T10 = types::skip>
00134 class lval_base : public internal::tuple<
00135         T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
00136 {
00137         typedef internal::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> tpl;
00138 
00139         typedef typename types::bare_type<T1>::type b1;
00140         typedef typename types::bare_type<T2>::type b2;
00141         typedef typename types::bare_type<T3>::type b3;
00142         typedef typename types::bare_type<T4>::type b4;
00143         typedef typename types::bare_type<T5>::type b5;
00144         typedef typename types::bare_type<T6>::type b6;
00145         typedef typename types::bare_type<T7>::type b7;
00146         typedef typename types::bare_type<T8>::type b8;
00147         typedef typename types::bare_type<T9>::type b9;
00148         typedef typename types::bare_type<T10>::type b10;
00149 
00150 public:
00151         lval_base(T1 arg1 = b1(), T2 arg2 = b2(), T3 arg3 = b3(),
00152                 T4 arg4 = b4(), T5 arg5 = b5(), T6 arg6 = b6(), T7 arg7 = b7(),
00153                 T8 arg8 = b8(), T9 arg9 = b9(), T10 arg10 = b10()) :
00154                 tpl(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) {};
00155 
00156         // TODO: optimize this maybe
00157         template<int N, class TPL>
00158         lval_base& operator=(const ivl::internal::tuple_base<N, TPL>& t)
00159         {
00160                 tpl::operator=(t);
00161                 return *this;
00162         }
00163         lval_base& operator=(const lval_base& f)
00164         {
00165                 tpl::operator=(f);
00166                 return *this;
00167         }
00168         template <class F>
00169         lval_base& operator=(const rvalue_base<F>& f)
00170         {
00171                 f.derived().tuple_output(*this);
00172                 return *this;
00173         }
00174                 /*
00175         lval_base& operator=(const lval_base& f)
00176         {
00177                 lvalue_base<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
00178                         (this->v1, this->v2, this->v3, this->v4, this->v5,
00179                                 this->v6, this->v7, this->v8, this->v9, this->v10) = f;
00180                 return *this;
00181         }
00182         template <class F>
00183         lval_base& operator=(const F& f)
00184         {
00185                 lvalue_base<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
00186                         (this->v1, this->v2, this->v3, this->v4, this->v5,
00187                                 this->v6, this->v7, this->v8, this->v9, this->v10) = f;
00188                 return *this;
00189         }
00190 */
00191         /*
00192         using tpl::operator=;
00193         template <class F>
00194         lval_base& operator=(const rvalue_base<F>& f)
00195         {
00196                 lvalue_base<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
00197                         lvb(this->v1, this->v2, this->v3, this->v4, this->v5,
00198                                 this->v6, this->v7, this->v8, this->v9, this->v10);
00199                 internal::apply_tuple_output(lvb, f.derived());
00200                 return *this;
00201         }*/
00202 };
00203 
00204 } /*namespace lvalue_details*/
00205 
00206 
00207 // lvalue functions
00208 
00209 template <class T0>
00210 inline
00211 lvalue_details::lvalue_base<T0&> lvalue(T0& t0)
00212 {
00213         return lvalue_details::lvalue_base<T0&>(t0);
00214 }
00215 
00216 template <class T0, class T1>
00217 inline
00218 lvalue_details::lvalue_base<T0&, T1&> lvalue(T0& t0, T1& t1)
00219 {
00220         return lvalue_details::lvalue_base<T0&, T1&>(t0, t1);
00221 }
00222 
00223 template <class T0, class T1, class T2>
00224 inline
00225 lvalue_details::lvalue_base<T0&, T1&, T2&> lvalue(T0& t0, T1& t1, T2& t2)
00226 {
00227         return lvalue_details::lvalue_base<T0&, T1&, T2&>(t0, t1, t2);
00228 }
00229 
00230 template <class T0, class T1, class T2, class T3>
00231 inline
00232 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&> lvalue(T0& t0,
00233                                                         T1& t1, T2& t2, T3& t3)
00234 {
00235         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&>(t0, t1, t2, t3);
00236 }
00237 
00238 template <class T0, class T1, class T2, class T3, class T4>
00239 inline
00240 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&> lvalue(T0& t0, T1& t1,
00241                                                         T2& t2, T3& t3, T4& t4)
00242 {
00243         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&>(t0, t1, t2,
00244                 t3, t4);
00245 }
00246 
00247 template <class T0, class T1, class T2, class T3, class T4, class T5>
00248 inline
00249 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&> lvalue(T0& t0, T1& t1,
00250                                                         T2& t2, T3& t3, T4& t4, T5& t5)
00251 {
00252         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&>(t0, t1, t2,
00253                 t3, t4, t5);
00254 }
00255 
00256 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6>
00257 inline
00258 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&, T6&> lvalue(T0& t0,
00259                 T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6)
00260 {
00261         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&, T6&>(t0,
00262                 t1, t2, t3, t4, t5, t6);
00263 }
00264 
00265 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00266 class T7>
00267 inline
00268 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&, T6&, T7&> lvalue(
00269                 T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7)
00270 {
00271         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&,
00272                 T5&, T6&, T7&>(t0, t1, t2, t3, t4, t5, t6, t7);
00273 }
00274 
00275 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00276 class T7, class T8>
00277 inline
00278 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&, T6&,
00279                 T7&, T8&> lvalue(T0& t0,
00280                         T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8)
00281 {
00282         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&,
00283                         T5&, T6&, T7&, T8&>(t0, t1, t2, t3, t4, t5, t6, t7, t8);
00284 }
00285 
00286 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00287 class T7, class T8, class T9>
00288 inline
00289 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&,
00290         T6&, T7&, T8&, T9&> lvalue(T0& t0,
00291                 T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9)
00292 {
00293         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&,
00294                         T5&, T6&, T7&, T8&, T9&>(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
00295 }
00296 
00297 
00298 // lhs synomym
00299 
00300 template <class T0>
00301 inline
00302 lvalue_details::lvalue_base<T0&> lhs(T0& t0)
00303 {
00304         return lvalue_details::lvalue_base<T0&>(t0);
00305 }
00306 
00307 template <class T0, class T1>
00308 inline
00309 lvalue_details::lvalue_base<T0&, T1&> lhs(T0& t0, T1& t1)
00310 {
00311         return lvalue_details::lvalue_base<T0&, T1&>(t0, t1);
00312 }
00313 
00314 template <class T0, class T1, class T2>
00315 inline
00316 lvalue_details::lvalue_base<T0&, T1&, T2&> lhs(T0& t0, T1& t1, T2& t2)
00317 {
00318         return lvalue_details::lvalue_base<T0&, T1&, T2&>(t0, t1, t2);
00319 }
00320 
00321 template <class T0, class T1, class T2, class T3>
00322 inline
00323 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&> lhs(T0& t0,
00324                                                         T1& t1, T2& t2, T3& t3)
00325 {
00326         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&>(t0, t1, t2, t3);
00327 }
00328 
00329 template <class T0, class T1, class T2, class T3, class T4>
00330 inline
00331 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&> lhs(T0& t0, T1& t1,
00332                                                         T2& t2, T3& t3, T4& t4)
00333 {
00334         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&>(t0, t1, t2,
00335                 t3, t4);
00336 }
00337 
00338 template <class T0, class T1, class T2, class T3, class T4, class T5>
00339 inline
00340 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&> lhs(T0& t0, T1& t1,
00341                                                         T2& t2, T3& t3, T4& t4, T5& t5)
00342 {
00343         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&>(t0, t1, t2,
00344                 t3, t4, t5);
00345 }
00346 
00347 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6>
00348 inline
00349 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&, T6&> lhs(T0& t0,
00350                 T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6)
00351 {
00352         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&, T6&>(t0,
00353                 t1, t2, t3, t4, t5, t6);
00354 }
00355 
00356 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00357 class T7>
00358 inline
00359 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&, T6&, T7&> lhs(
00360                 T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7)
00361 {
00362         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&,
00363                 T5&, T6&, T7&>(t0, t1, t2, t3, t4, t5, t6, t7);
00364 }
00365 
00366 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00367 class T7, class T8>
00368 inline
00369 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&, T6&,
00370                 T7&, T8&> lhs(T0& t0,
00371                         T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8)
00372 {
00373         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&,
00374                         T5&, T6&, T7&, T8&>(t0, t1, t2, t3, t4, t5, t6, t7, t8);
00375 }
00376 
00377 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00378 class T7, class T8, class T9>
00379 inline
00380 lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&, T5&,
00381         T6&, T7&, T8&, T9&> lhs(T0& t0,
00382                 T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9)
00383 {
00384         return lvalue_details::lvalue_base<T0&, T1&, T2&, T3&, T4&,
00385                         T5&, T6&, T7&, T8&, T9&>(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
00386 }
00387 
00388 
00389 #if 0
00390 
00391 
00392 template<typename T0>
00393 class lvalue1 {
00394 private:
00395         typename arg<T0>::type t0;
00396 
00397 public:
00398         lvalue1(T0 arg0): t0(arg0){};
00399 
00400         template <class F> void operator=(const rvalue_base<F>& f)
00401         { f.derived().output(t0); };
00402 };
00403 
00404 
00405 template<typename T0, typename T1>
00406 class lvalue2 {
00407 private:
00408         typename arg<T0>::type t0;
00409         typename arg<T1>::type t1;
00410 
00411 public:
00412         lvalue2(T0 arg0, T1 arg1): t0(arg0), t1(arg1) {};
00413 
00414         template <class F> void operator=(const rvalue_base<F>& f)
00415         { f.derived().output(t0, t1); };
00416 };
00417 
00418 
00419 template<typename T0, typename T1, typename T2>
00420 class lvalue3 {
00421 private:
00422         typename arg<T0>::type t0;
00423         typename arg<T1>::type t1;
00424         typename arg<T2>::type t2;
00425 
00426 public:
00427         lvalue3(T0 arg0, T1 arg1, T2 arg2): t0(arg0), t1(arg1), t2(arg2) {};
00428 
00429         template <class F> void operator=(const rvalue_base<F>& f)
00430         { f.derived().output(t0, t1, t2); };
00431 };
00432 
00433 
00434 template<typename T0, typename T1, typename T2, typename T3>
00435 class lvalue4 {
00436 private:
00437         typename arg<T0>::type t0;
00438         typename arg<T1>::type t1;
00439         typename arg<T2>::type t2;
00440         typename arg<T3>::type t3;
00441 
00442 public:
00443         lvalue4(T0 arg0, T1 arg1, T2 arg2, T3 arg3):
00444       t0(arg0), t1(arg1), t2(arg2), t3(arg3) {};
00445 
00446         template <class F> void operator=(const rvalue_base<F>& f)
00447         { f.derived().output(t0, t1, t2, t3); };
00448 };
00449 
00450 template<typename T0, typename T1, typename T2, typename T3, typename T4>
00451 class lvalue5 {
00452 private:
00453         typename arg<T0>::type t0;
00454         typename arg<T1>::type t1;
00455         typename arg<T2>::type t2;
00456         typename arg<T3>::type t3;
00457         typename arg<T4>::type t4;
00458 
00459 public:
00460         lvalue5(T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4):
00461       t0(arg0), t1(arg1), t2(arg2), t3(arg3), t4(arg4) {};
00462 
00463         template <class F> void operator=(const rvalue_base<F>& f)
00464         { f.derived().output(t0, t1, t2, t3, t4); };
00465 };
00466 
00467 template<typename T0, typename T1, typename T2, typename T3, typename T4,
00468                                                                 typename T5>
00469 class lvalue6 {
00470 private:
00471         typename arg<T0>::type t0;
00472         typename arg<T1>::type t1;
00473         typename arg<T2>::type t2;
00474         typename arg<T3>::type t3;
00475         typename arg<T4>::type t4;
00476         typename arg<T5>::type t5;
00477 
00478 public:
00479         lvalue6(T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5):
00480       t0(arg0), t1(arg1), t2(arg2), t3(arg3), t4(arg4), t5(arg5) {};
00481 
00482         template <class F> void operator=(const rvalue_base<F>& f)
00483         { f.derived().output(t0, t1, t2, t3, t4, t5); };
00484 };
00485 
00486 template<typename T0, typename T1, typename T2, typename T3, typename T4,
00487                                                 typename T5, typename T6>
00488 class lvalue7 {
00489 private:
00490         typename arg<T0>::type t0;
00491         typename arg<T1>::type t1;
00492         typename arg<T2>::type t2;
00493         typename arg<T3>::type t3;
00494         typename arg<T4>::type t4;
00495         typename arg<T5>::type t5;
00496         typename arg<T6>::type t6;
00497 
00498 public:
00499         lvalue7(T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5,
00500                 T6 arg6):
00501         t0(arg0), t1(arg1), t2(arg2), t3(arg3), t4(arg4), t5(arg5), t6(arg6){};
00502 
00503         template <class F> void operator=(const rvalue_base<F>& f)
00504         { f.derived().output(t0, t1, t2, t3, t4, t5, t6); };
00505 };
00506 
00507 template<typename T0, typename T1, typename T2, typename T3, typename T4,
00508                                         typename T5, typename T6, typename T7>
00509 class lvalue8 {
00510 private:
00511         typename arg<T0>::type t0;
00512         typename arg<T1>::type t1;
00513         typename arg<T2>::type t2;
00514         typename arg<T3>::type t3;
00515         typename arg<T4>::type t4;
00516         typename arg<T5>::type t5;
00517         typename arg<T6>::type t6;
00518         typename arg<T7>::type t7;
00519 
00520 public:
00521         lvalue8(T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5,
00522                 T6 arg6, T7 arg7):
00523         t0(arg0), t1(arg1), t2(arg2), t3(arg3), t4(arg4), t5(arg5),
00524                 t6(arg6), t7(arg7) {};
00525 
00526         template <class F> void operator=(const rvalue_base<F>& f)
00527         { f.derived().output(t0, t1, t2, t3, t4, t5, t6, t7); };
00528 };
00529 
00530 template<typename T0, typename T1, typename T2, typename T3, typename T4,
00531                         typename T5, typename T6, typename T7, typename T8>
00532 class lvalue9 {
00533 private:
00534         typename arg<T0>::type t0;
00535         typename arg<T1>::type t1;
00536         typename arg<T2>::type t2;
00537         typename arg<T3>::type t3;
00538         typename arg<T4>::type t4;
00539         typename arg<T5>::type t5;
00540         typename arg<T6>::type t6;
00541         typename arg<T7>::type t7;
00542         typename arg<T8>::type t8;
00543 
00544 public:
00545         lvalue9(T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5,
00546                 T6 arg6, T7 arg7, T8 arg8):
00547         t0(arg0), t1(arg1), t2(arg2), t3(arg3), t4(arg4), t5(arg5), t6(arg6),
00548                 t7(arg7), t8(arg8) {};
00549 
00550         template <class F> void operator=(const rvalue_base<F>& f)
00551         { f.derived().output(t0, t1, t2, t3, t4, t5, t6, t7, t8); };
00552 };
00553 
00554 template<typename T0, typename T1, typename T2, typename T3, typename T4,
00555         typename T5, typename T6, typename T7, typename T8, typename T9>
00556 class lvalue10 {
00557 private:
00558         typename arg<T0>::type t0;
00559         typename arg<T1>::type t1;
00560         typename arg<T2>::type t2;
00561         typename arg<T3>::type t3;
00562         typename arg<T4>::type t4;
00563         typename arg<T5>::type t5;
00564         typename arg<T6>::type t6;
00565         typename arg<T7>::type t7;
00566         typename arg<T8>::type t8;
00567         typename arg<T9>::type t9;
00568 
00569 public:
00570         lvalue10(T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5,
00571                 T6 arg6, T7 arg7, T8 arg8, T9 arg9):
00572         t0(arg0), t1(arg1), t2(arg2), t3(arg3), t4(arg4), t5(arg5), t6(arg6),
00573                 t7(arg7), t8(arg8), t9(arg9) {};
00574 
00575         template <class F> void operator=(const rvalue_base<F>& f)
00576         { f.derived().output(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); };
00577 };
00578 
00579 
00580 #endif
00581 
00582 
00583 } /*namespace ivl*/
00584 #endif
00585 
00586 
00587 
00588 
00589 
00590 namespace ivl {
00591 
00592 
00593 template <class T0>
00594 inline
00595 internal::tuple<T0&> lvalue(T0& t0)
00596 {
00597         return internal::reftpl(t0);
00598 }
00599 
00600 template <class T0, class T1>
00601 inline
00602 internal::tuple<T0&, T1&> lvalue(T0& t0, T1& t1)
00603 {
00604         return internal::reftpl(t0, t1);
00605 }
00606 
00607 template <class T0, class T1, class T2>
00608 inline
00609 internal::tuple<T0&, T1&, T2&> lvalue(T0& t0, T1& t1, T2& t2)
00610 {
00611         return internal::reftpl(t0, t1, t2);
00612 }
00613 
00614 template <class T0, class T1, class T2, class T3>
00615 inline
00616 internal::tuple<T0&, T1&, T2&, T3&> lvalue(T0& t0, T1& t1, T2& t2, T3& t3)
00617 {
00618         return internal::reftpl(t0, t1, t2, t3);
00619 }
00620 
00621 template <class T0, class T1, class T2, class T3, class T4>
00622 inline
00623 internal::tuple<T0&, T1&, T2&, T3&, T4&> lvalue(T0& t0, T1& t1, T2& t2,
00624                                                    T3& t3, T4& t4)
00625 {
00626         return internal::reftpl(t0, t1, t2, t3, t4);
00627 }
00628 
00629 template <class T0, class T1, class T2, class T3, class T4, class T5>
00630 inline
00631 internal::tuple<T0&, T1&, T2&, T3&, T4&, T5&> lvalue(T0& t0, T1& t1, T2& t2,
00632                                                        T3& t3, T4& t4, T5& t5)
00633 {
00634         return internal::reftpl(t0, t1, t2, t3, t4, t5);
00635 }
00636 
00637 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6>
00638 inline
00639 internal::tuple<T0&, T1&, T2&, T3&, T4&, T5&, T6&> lvalue(T0& t0, T1& t1,
00640                                                            T2& t2, T3& t3,
00641                                                            T4& t4, T5& t5, T6& t6)
00642 {
00643         return internal::reftpl(t0, t1, t2, t3, t4, t5, t6);
00644 }
00645 
00646 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00647 class T7>
00648 inline
00649 internal::tuple<T0&, T1&, T2&, T3&, T4&, T5&, T6&, T7&> lvalue(T0& t0, T1& t1,
00650                                                                T2& t2, T3& t3,
00651                                                                T4& t4, T5& t5,
00652                                                                T6& t6, T7& t7)
00653 {
00654         return internal::reftpl(t0, t1, t2, t3, t4, t5, t6, t7);
00655 }
00656 
00657 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00658 class T7, class T8>
00659 inline
00660 internal::tuple<T0&, T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&> lvalue(T0& t0,
00661                 T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8)
00662 {
00663         return internal::reftpl(t0, t1, t2, t3, t4, t5, t6, t7, t8);
00664 }
00665 
00666 template <class T0, class T1, class T2, class T3, class T4, class T5, class T6,
00667 class T7, class T8, class T9>
00668 inline
00669 internal::tuple<T0&, T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&> lvalue(T0& t0,
00670         T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9)
00671 {
00672         return internal::reftpl(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
00673 }
00674 
00675 } /* namespace ivl */
00676 
00677 
00678 
00679 
00680 
00681 #endif // IVL_CORE_DETAILS_LVALUE_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations