This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[patch] Preprocessorised tr1::tuple
- From: Chris Jefferson <caj at cs dot york dot ac dot uk>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 22 Feb 2005 22:17:31 +0000
- Subject: [patch] Preprocessorised tr1::tuple
This isn't as nice as I would like it to be. On the other hand it is as
functional as the old implementation was (I have added one new test,
which both the old and new implementation passes)
tuple is now implemented in two files. tuple includes those parts which
do not need to be repeated, tuple_loop.h includes those parts which need
to be repeated many times. This is handled by preprocessor_loop.h
preprocessor.h is a tiny preprocessor library (I managed to come up with
a sufficently different manner if implementing EQUAL, which is what I
was having trouble with before, the rest was all written by myself
without reference to any other code). While this does correctly handle
the tuple header, and pass a small test suite, I really don't promise it
will do anything else :)
I took the opportunity to nuke some uglification, although I have kept
the preprocessor library in _GLIBCXX_PRE, as it might be included in
many places and had lots of commonly occuring names so i felt more
comfortable doing that at first, as it's much easier to strip it out
than put it in :)
Any comments are welcome. Apologises again that this is much less neat
than I might like, but I found it very hard to make it neat and have
been busy recently ¬_¬
Chris
2005-02-22 Christopher Jefferson <chris@bubblescope.net>
* include/tr1/tuple : Replace with macroised implementation.
* include/tr1/tuple_loop.h : New.
* include/tr1/preproccesor.h : New.
* include/tr1/preprocessor_loop.h: New.
* testsuite/ext/preprocessor/if.cc: New.
* testsuite/ext/preprocessor/inc.cc: New.
* testsuite/ext/preprocessor/equal.cc: New.
* testsuite/ext/preprocessor/loop.cc: New.
* testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc:
Add test for make_tuple(void).
* testsuite/tr1/6_containers/tuple/creation_functions/tie.cc:
Add test for tie(void).
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/include/tr1/preprocessor.h libstdc++-v3.cvs/include/tr1/preprocessor.h
0a1,675
> // Internal preprocessor library -*- C++ -*-
>
> // Copyright (C) 2005 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 2, or (at your option)
> // any later version.
>
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> // GNU General Public License for more details.
>
> // You should have received a copy of the GNU General Public License along
> // with this library; see the file COPYING. If not, write to the Free
> // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> // USA.
>
> // As a special exception, you may use this file as part of a free software
> // library without restriction. Specifically, if other files instantiate
> // templates or use macros or inline functions from this file, or you compile
> // this file and link it with other files to produce an executable, this
> // file does not by itself cause the resulting executable to be covered by
> // the GNU General Public License. This exception does not however
> // invalidate any other reasons why the executable file might be covered by
> // the GNU General Public License.
>
> /** @file
> * This is a TR1 C++ Library header.
> */
>
> // This file contains a basic preprocessor library to aid generation
> // of code with repeated constructs. Note that this is an INTERNAL library,
> // subject to change without notice, and therefore should not be assumed
> // to have been as completely tested as other parts of libstdc++-v3.
>
>
> // does the same as x##y, but forces expansion x and y first.
> #define _GLIBCXX_PRE_CAT(_Left, _Right) \
> _GLIBCXX_PRE_CAT_INTERNAL( _Left, _Right)
>
> // This is here because commas can't be used in macro parameter lists
> #define _GLIBCXX_PRE_COMMA() ,
>
> // For use as a dummy value.
> #define _GLIBCXX_PRE_EMPTY()
>
> // Adds one to the input value.
> #define _GLIBCXX_PRE_INC(_Value) \
> _GLIBCXX_PRE_CAT(_GLIBCXX_PRE_INC_, _Value)
>
> // If the first parameter is 1, return the second, else the third.
> #define _GLIBCXX_PRE_IF(_Check, _TrueVal, _FalseVal) \
> _GLIBCXX_PRE_CAT(_GLIBCXX_PRE_IF_, _Check)(_TrueVal, _FalseVal)
>
> // At each value from the first parameter to the second, execute
> //_GLIBCXX_PRE_MACRO(val) between each pair of output parameters,
> // put _GLIBCXX_PRE_SEPERATOR() between each pair..
> #define _GLIBCXX_PRE_LOOP(_Begin, _End, _Macro, _Seperator) \
> _GLIBCXX_PRE_LOOP_INITIAL(_Begin, _End, _Macro, _Seperator)
>
> // Returns 1 if the two values are equal, 0 otherwise
> #define _GLIBCXX_PRE_EQUAL(_Left, _Right) \
> _GLIBCXX_PRE_CAT(_GLIBCXX_PRE,_GLIBCXX_PRE_EQUAL_I(_Left, _Right))
>
> // Below follows implementation details!
>
> // A couple of macros which are used in various things
>
> #define _GLIBCXX_PRE_PEEL(_Value) _Value
>
> #define _GLIBCXX_PRE_EAT(_Value)
>
> // Implementation for equal.
>
> #define _GLIBCXX_PRE_EQUAL_I(_Left, _Right) \
> _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_##_Left(_GLIBCXX_PRE, \
> _GLIBCXX_PRE_CONCAT_## \
> _Right (_GLIBCXX_PRE_NUM0,))
>
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_0(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_1(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_2(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_3(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_4(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_5(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_6(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_7(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_8(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_9(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_10(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_11(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_12(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_13(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_14(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_15(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_16(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_17(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_18(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_19(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_20(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_21(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_22(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_23(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_24(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_25(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_26(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_27(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_28(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_29(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_30(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_31(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_32(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_33(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_34(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_35(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_36(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_37(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_38(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_39(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_40(_Left, _Right) _Left ## _Right
> #define _GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_41(_Left, _Right) _Left ## _Right
>
> #define _GLIBCXX_PRE_GLIBCXX_PRE_NUM0 0
>
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_0(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_1(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_2(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_3(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_4(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_5(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_6(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_7(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_8(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_9(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_10(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_11(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_12(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_13(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_14(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_15(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_16(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_17(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_18(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_19(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_20(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_21(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_22(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_23(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_24(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_25(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_26(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_27(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_28(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_29(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_30(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_31(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_32(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_33(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_34(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_35(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_36(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_37(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_38(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_39(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_40(_Left, \
> _Right) 1
> #define _GLIBCXX_PRE_GLIBCXX_PRE_GLIBCXX_PRE_CONCAT_41(_Left, \
> _Right) 1
>
> // Implementation of if.
>
> #define _GLIBCXX_PRE_IF_0(_Left, _Right) _Right
> #define _GLIBCXX_PRE_IF_1(_Left, _Right) _Left
>
> // Implementation of cat.
>
> #define _GLIBCXX_PRE_CAT_INTERNAL(_Left, _Right) _Left ## _Right
>
> // Implementation of inc.
>
> #define _GLIBCXX_PRE_INC_0 1
> #define _GLIBCXX_PRE_INC_1 2
> #define _GLIBCXX_PRE_INC_2 3
> #define _GLIBCXX_PRE_INC_3 4
> #define _GLIBCXX_PRE_INC_4 5
> #define _GLIBCXX_PRE_INC_5 6
> #define _GLIBCXX_PRE_INC_6 7
> #define _GLIBCXX_PRE_INC_7 8
> #define _GLIBCXX_PRE_INC_8 9
> #define _GLIBCXX_PRE_INC_9 10
> #define _GLIBCXX_PRE_INC_10 11
> #define _GLIBCXX_PRE_INC_11 12
> #define _GLIBCXX_PRE_INC_12 13
> #define _GLIBCXX_PRE_INC_13 14
> #define _GLIBCXX_PRE_INC_14 15
> #define _GLIBCXX_PRE_INC_15 16
> #define _GLIBCXX_PRE_INC_16 17
> #define _GLIBCXX_PRE_INC_17 18
> #define _GLIBCXX_PRE_INC_18 19
> #define _GLIBCXX_PRE_INC_19 20
> #define _GLIBCXX_PRE_INC_20 21
> #define _GLIBCXX_PRE_INC_21 22
> #define _GLIBCXX_PRE_INC_22 23
> #define _GLIBCXX_PRE_INC_23 24
> #define _GLIBCXX_PRE_INC_24 25
> #define _GLIBCXX_PRE_INC_25 26
> #define _GLIBCXX_PRE_INC_26 27
> #define _GLIBCXX_PRE_INC_27 28
> #define _GLIBCXX_PRE_INC_28 29
> #define _GLIBCXX_PRE_INC_29 30
> #define _GLIBCXX_PRE_INC_30 31
> #define _GLIBCXX_PRE_INC_31 32
> #define _GLIBCXX_PRE_INC_32 33
> #define _GLIBCXX_PRE_INC_33 34
> #define _GLIBCXX_PRE_INC_34 35
> #define _GLIBCXX_PRE_INC_35 36
> #define _GLIBCXX_PRE_INC_36 37
> #define _GLIBCXX_PRE_INC_37 38
> #define _GLIBCXX_PRE_INC_38 39
> #define _GLIBCXX_PRE_INC_39 30
> #define _GLIBCXX_PRE_INC_40 41
>
> // Implementation of loop.
>
> #define _GLIBCXX_PRE_LOOP_INITIAL(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT , _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_1(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_1(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_2(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_2(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_3(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_3(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_4(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_4(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_5(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_5(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_6(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_6(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_7(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_7(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_8(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_8(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_9(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_9(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_10(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_10(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_11(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_11(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_12(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_12(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_13(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_13(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_14(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_14(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_15(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_15(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_16(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_16(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_17(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_17(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_18(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_18(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_19(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_19(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_20(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_20(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_21(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_21(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_22(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_22(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_23(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_23(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_24(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_24(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_25(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_25(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_26(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_26(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_27(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_27(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_28(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_28(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_29(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_29(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_30(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_30(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_31(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_31(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_32(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_32(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_33(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_33(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_34(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_34(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_35(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_35(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_36(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_36(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_37(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_37(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_38(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_38(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_39(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_39(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_40(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
> #define _GLIBCXX_PRE_LOOP_40(_First, _Last, \
> _Macro, _Seperator) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EMPTY, _Seperator)() \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_First, _Last), \
> _GLIBCXX_PRE_EAT, _GLIBCXX_PRE_PEEL) \
> (_Macro(_First) \
> _GLIBCXX_PRE_LOOP_41(_GLIBCXX_PRE_INC(_First), \
> _Last, _Macro, _Seperator))
>
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/include/tr1/preprocessor_loop.h libstdc++-v3.cvs/include/tr1/preprocessor_loop.h
0a1,279
> // Preprocessor helper file -*- C++ -*-
>
> // Copyright (C) 2005 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 2, or (at your option)
> // any later version.
>
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> // GNU General Public License for more details.
>
> // You should have received a copy of the GNU General Public License along
> // with this library; see the file COPYING. If not, write to the Free
> // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> // USA.
>
> // As a special exception, you may use this file as part of a free software
> // library without restriction. Specifically, if other files instantiate
> // templates or use macros or inline functions from this file, or you compile
> // this file and link it with other files to produce an executable, this
> // file does not by itself cause the resulting executable to be covered by
> // the GNU General Public License. This exception does not however
> // invalidate any other reasons why the executable file might be covered by
> // the GNU General Public License.
>
> // This file is part of the libstdc++ preprocessor library.
>
> // To use this file, define _LOOP_FILE to the name of the file
> // to be included multiple times, and _LOOPVAL to be the number
> // of times it should be included. The file will then be included that many
> // times, where _LOOPVAL will be defined to the current loop
> // iteration each time.
>
> #define _LOOPVAL 0
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #define _LOOPVAL 1
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>2
> #define _LOOPVAL 2
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>3
> #define _LOOPVAL 3
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>4
> #define _LOOPVAL 4
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>5
> #define _LOOPVAL 5
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>6
> #define _LOOPVAL 6
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>7
> #define _LOOPVAL 7
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>8
> #define _LOOPVAL 8
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>9
> #define _LOOPVAL 9
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>10
> #define _LOOPVAL 10
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>11
> #define _LOOPVAL 11
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>12
> #define _LOOPVAL 12
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>13
> #define _LOOPVAL 13
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>14
> #define _LOOPVAL 14
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>15
> #define _LOOPVAL 15
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>16
> #define _LOOPVAL 16
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>17
> #define _LOOPVAL 17
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>18
> #define _LOOPVAL 18
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>19
> #define _LOOPVAL 19
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>20
> #define _LOOPVAL 20
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>21
> #define _LOOPVAL 21
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>22
> #define _LOOPVAL 22
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>23
> #define _LOOPVAL 23
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>24
> #define _LOOPVAL 24
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>25
> #define _LOOPVAL 25
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>26
> #define _LOOPVAL 26
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>27
> #define _LOOPVAL 27
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>28
> #define _LOOPVAL 28
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>29
> #define _LOOPVAL 29
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>30
> #define _LOOPVAL 30
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>31
> #define _LOOPVAL 31
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>32
> #define _LOOPVAL 32
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>33
> #define _LOOPVAL 33
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>34
> #define _LOOPVAL 34
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>35
> #define _LOOPVAL 35
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>36
> #define _LOOPVAL 36
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>37
> #define _LOOPVAL 37
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>38
> #define _LOOPVAL 38
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>39
> #define _LOOPVAL 39
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #if _LOOPMAX>40
> #define _LOOPVAL 40
> #include _LOOP_FILE
> #undef _LOOPVAL
>
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
> #endif
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/include/tr1/tuple libstdc++-v3.cvs/include/tr1/tuple
3c3
< // Copyright (C) 2004, 2005 Free Software Foundation, Inc.
---
> // Copyright (C) 2004 Free Software Foundation, Inc.
34,36d33
< // Chris Jefferson <chris@bubblescope.net>
<
< // This header is automatically generated: see maketuple.c for details.
42a40,60
> #include "preprocessor.h"
>
> // Defines the maximum size of tuples.
> // TODO: Make this more easily configurable.
> #ifndef _GLIBCXX_TUPLE_MAX
> #define _GLIBCXX_TUPLE_MAX 20
> #endif
>
>
>
> #define _NULLCLASS(_Val) typename Tp##_Val = _NullClass
> #define _PLAIN_NULLCLASS(_Val) _NullClass
> #define _TYPENAME_T(_Val) typename _GLIBCXX_PRE_CAT(Tp, _Val)
> #define _TYPENAME_U(_Val) typename _GLIBCXX_PRE_CAT(Up, _Val)
>
> #define _TP_EXP(_Val) Tp##_Val
> #define _UP_EXP(_Val) Up##_Val
> #define _UNROLL_MAX_PARAMETER(_Val) _GLIBCXX_PRE_LOOP(0, _GLIBCXX_TUPLE_MAX, \
> _Val, _GLIBCXX_PRE_COMMA)
> #define _UNROLL_MAX_FUNCTION(_Val) _GLIBCXX_PRE_LOOP(0, _GLIBCXX_TUPLE_MAX, \
> _Val, _GLIBCXX_PRE_EMPTY)
52,56c70
< template<typename _Tp0 = _NullClass, typename _Tp1 = _NullClass,
< typename _Tp2 = _NullClass, typename _Tp3 = _NullClass,
< typename _Tp4 = _NullClass, typename _Tp5 = _NullClass,
< typename _Tp6 = _NullClass, typename _Tp7 = _NullClass,
< typename _Tp8 = _NullClass, typename _Tp9 = _NullClass>
---
> template<_UNROLL_MAX_PARAMETER(_NULLCLASS)>
60c74
< template<int __i, typename _Tp>
---
> template<int i, typename Tp>
63,133d76
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<0, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp0 type; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<1, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp1 type; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<2, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp2 type; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<3, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp3 type; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<4, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp4 type; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<5, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp5 type; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<6, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp6 type; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<7, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp7 type; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<8, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp8 type; };
<
< /// @brief class tuple_element
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_element<9, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >
< { typedef _Tp9 type; };
<
135c78
< template<typename _Tp>
---
> template<typename Tp>
138,205d80
< template<>
< struct tuple_size<tuple<_NullClass, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass> >
< { static const int value = 0; };
<
< template< typename _Tp0>
< struct tuple_size<tuple< _Tp0, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass> >
< { static const int value = 1; };
<
< template<typename _Tp0, typename _Tp1>
< struct tuple_size<tuple<_Tp0, _Tp1, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass,
< _NullClass> >
< { static const int value = 2; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2>
< struct tuple_size<tuple<_Tp0, _Tp1, _Tp2, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass,
< _NullClass> >
< { static const int value = 3; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3>
< struct tuple_size<tuple<_Tp0, _Tp1, _Tp2, _Tp3, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass> >
< { static const int value = 4; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4>
< struct tuple_size<tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass> >
< { static const int value = 5; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5>
< struct tuple_size<tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _NullClass,
< _NullClass, _NullClass, _NullClass> >
< { static const int value = 6; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6>
< struct tuple_size<tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _NullClass, _NullClass, _NullClass> >
< { static const int value = 7; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7>
< struct tuple_size<tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7,
< _NullClass, _NullClass> >
< { static const int value = 8; };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8>
< struct tuple_size<tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7,
< _Tp8, _NullClass> >
< { static const int value = 9; };
<
< /// @brief class tuple_size
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< struct tuple_size<tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7,
< _Tp8, _Tp9> >
< { static const int value = 10; };
<
207c82
< template<typename _Tp>
---
> template<typename Tp>
209c84
< { typedef const _Tp& type; };
---
> { typedef const Tp& type; };
211,213c86,88
< template<typename _Tp>
< struct __add_c_ref<_Tp&>
< { typedef _Tp& type; };
---
> template<typename Tp>
> struct __add_c_ref<Tp&>
> { typedef Tp& type; };
216c91
< template<typename _Tp>
---
> template<typename Tp>
218,231c93
< { typedef _Tp& type; };
<
< template<typename _Tp>
< struct __add_ref<_Tp&>
< { typedef _Tp& type; };
<
< // The empty tuple.
< template<>
< class tuple<_NullClass, _NullClass, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass, _NullClass>
< {
< public:
< tuple()
< { }
---
> { typedef Tp& type; };
233,933c95,97
< tuple(const tuple& __in)
< { }
<
< tuple& operator=(const tuple& __in)
< { return *this; }
< };
<
< template< typename _Tp0>
< class tuple< _Tp0, _NullClass, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass, _NullClass>
< {
< _Tp0 _M_t0;
<
< public:
< tuple()
< { }
<
< explicit tuple( typename __add_c_ref<_Tp0>::type __in0):
< _M_t0(__in0)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0)
< { }
<
< template< typename _Up0>
< tuple(const tuple< _Up0>& __in):
< _M_t0(__in._M_t0)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< return *this;
< }
<
< template< typename _Up0>
< tuple&
< operator=(const tuple< _Up0>& __in)
< {
< _M_t0=__in._M_t0;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< template<typename _Tp0, typename _Tp1>
< class tuple<_Tp0, _Tp1, _NullClass, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass>
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1):
< _M_t0(__in0), _M_t1(__in1)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1)
< { }
<
< template<typename _Up0, typename _Up1>
< tuple(const tuple<_Up0, _Up1>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1)
< { }
<
< template<class _Up1, class _Up2>
< tuple(const std::pair<_Up1, _Up2>& __u):
< _M_t0(__u.first), _M_t1(__u.second)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< return *this;
< }
<
< template<typename _Up0, typename _Up1>
< tuple&
< operator=(const tuple<_Up0, _Up1>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2>
< class tuple<_Tp0, _Tp1, _Tp2, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass, _NullClass>
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
< _Tp2 _M_t2;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1,
< typename __add_c_ref<_Tp2>::type __in2):
< _M_t0(__in0), _M_t1(__in1), _M_t2(__in2)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2)
< { }
<
< template<typename _Up0, typename _Up1, typename _Up2>
< tuple(const tuple<_Up0, _Up1, _Up2>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< return *this;
< }
<
< template<typename _Up0, typename _Up1, typename _Up2>
< tuple&
< operator=(const tuple<_Up0, _Up1, _Up2>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3>
< class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _NullClass, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass>
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
< _Tp2 _M_t2;
< _Tp3 _M_t3;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1,
< typename __add_c_ref<_Tp2>::type __in2,
< typename __add_c_ref<_Tp3>::type __in3):
< _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3)
< { }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3>
< tuple(const tuple<_Up0, _Up1, _Up2, _Up3>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< return *this;
< }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3>
< tuple&
< operator=(const tuple<_Up0, _Up1, _Up2, _Up3>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4>
< class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _NullClass, _NullClass,
< _NullClass, _NullClass, _NullClass>
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
< _Tp2 _M_t2;
< _Tp3 _M_t3;
< _Tp4 _M_t4;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1,
< typename __add_c_ref<_Tp2>::type __in2,
< typename __add_c_ref<_Tp3>::type __in3,
< typename __add_c_ref<_Tp4>::type __in4):
< _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4)
< { }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4>
< tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< return *this;
< }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4>
< tuple&
< operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5>
< class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _NullClass, _NullClass,
< _NullClass, _NullClass>
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
< _Tp2 _M_t2;
< _Tp3 _M_t3;
< _Tp4 _M_t4;
< _Tp5 _M_t5;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1,
< typename __add_c_ref<_Tp2>::type __in2,
< typename __add_c_ref<_Tp3>::type __in3,
< typename __add_c_ref<_Tp4>::type __in4,
< typename __add_c_ref<_Tp5>::type __in5):
< _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4),
< _M_t5(__in5)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5)
< { }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5>
< tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< return *this;
< }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5>
< tuple&
< operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6>
< class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _NullClass,
< _NullClass, _NullClass>
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
< _Tp2 _M_t2;
< _Tp3 _M_t3;
< _Tp4 _M_t4;
< _Tp5 _M_t5;
< _Tp6 _M_t6;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1,
< typename __add_c_ref<_Tp2>::type __in2,
< typename __add_c_ref<_Tp3>::type __in3,
< typename __add_c_ref<_Tp4>::type __in4,
< typename __add_c_ref<_Tp5>::type __in5,
< typename __add_c_ref<_Tp6>::type __in6):
< _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4),
< _M_t5(__in5), _M_t6(__in6)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5),
< _M_t6(__in._M_t6)
< { }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5, typename _Up6>
< tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5),
< _M_t6(__in._M_t6)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< _M_t6=__in._M_t6;
< return *this;
< }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5, typename _Up6>
< tuple&
< operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5,
< _Up6>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< _M_t6=__in._M_t6;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7>
< class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _NullClass,
< _NullClass>
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
< _Tp2 _M_t2;
< _Tp3 _M_t3;
< _Tp4 _M_t4;
< _Tp5 _M_t5;
< _Tp6 _M_t6;
< _Tp7 _M_t7;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1,
< typename __add_c_ref<_Tp2>::type __in2,
< typename __add_c_ref<_Tp3>::type __in3,
< typename __add_c_ref<_Tp4>::type __in4,
< typename __add_c_ref<_Tp5>::type __in5,
< typename __add_c_ref<_Tp6>::type __in6,
< typename __add_c_ref<_Tp7>::type __in7):
< _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4),
< _M_t5(__in5), _M_t6(__in6), _M_t7(__in7)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5),
< _M_t6(__in._M_t6), _M_t7(__in._M_t7)
< { }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5, typename _Up6, typename _Up7>
< tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6,
< _Up7>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5),
< _M_t6(__in._M_t6), _M_t7(__in._M_t7)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< _M_t6=__in._M_t6;
< _M_t7=__in._M_t7;
< return *this;
< }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5, typename _Up6, typename _Up7>
< tuple&
< operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6,
< _Up7>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< _M_t6=__in._M_t6;
< _M_t7=__in._M_t7;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8>
< class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8,
< _NullClass>
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
< _Tp2 _M_t2;
< _Tp3 _M_t3;
< _Tp4 _M_t4;
< _Tp5 _M_t5;
< _Tp6 _M_t6;
< _Tp7 _M_t7;
< _Tp8 _M_t8;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1,
< typename __add_c_ref<_Tp2>::type __in2,
< typename __add_c_ref<_Tp3>::type __in3,
< typename __add_c_ref<_Tp4>::type __in4,
< typename __add_c_ref<_Tp5>::type __in5,
< typename __add_c_ref<_Tp6>::type __in6,
< typename __add_c_ref<_Tp7>::type __in7,
< typename __add_c_ref<_Tp8>::type __in8):
< _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4),
< _M_t5(__in5), _M_t6(__in6), _M_t7(__in7), _M_t8(__in8)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5),
< _M_t6(__in._M_t6), _M_t7(__in._M_t7), _M_t8(__in._M_t8)
< { }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5, typename _Up6, typename _Up7,
< typename _Up8>
< tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7,
< _Up8>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5),
< _M_t6(__in._M_t6), _M_t7(__in._M_t7), _M_t8(__in._M_t8)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< _M_t6=__in._M_t6;
< _M_t7=__in._M_t7;
< _M_t8=__in._M_t8;
< return *this;
< }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5, typename _Up6, typename _Up7,
< typename _Up8>
< tuple&
< operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7,
< _Up8>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< _M_t6=__in._M_t6;
< _M_t7=__in._M_t7;
< _M_t8=__in._M_t8;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
<
< /// @brief Template class tuple
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< class tuple
< {
< _Tp0 _M_t0;
< _Tp1 _M_t1;
< _Tp2 _M_t2;
< _Tp3 _M_t3;
< _Tp4 _M_t4;
< _Tp5 _M_t5;
< _Tp6 _M_t6;
< _Tp7 _M_t7;
< _Tp8 _M_t8;
< _Tp9 _M_t9;
<
< public:
< tuple()
< { }
<
< explicit tuple(typename __add_c_ref<_Tp0>::type __in0,
< typename __add_c_ref<_Tp1>::type __in1,
< typename __add_c_ref<_Tp2>::type __in2,
< typename __add_c_ref<_Tp3>::type __in3,
< typename __add_c_ref<_Tp4>::type __in4,
< typename __add_c_ref<_Tp5>::type __in5,
< typename __add_c_ref<_Tp6>::type __in6,
< typename __add_c_ref<_Tp7>::type __in7,
< typename __add_c_ref<_Tp8>::type __in8,
< typename __add_c_ref<_Tp9>::type __in9):
< _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4),
< _M_t5(__in5), _M_t6(__in6), _M_t7(__in7), _M_t8(__in8), _M_t9(__in9)
< { }
<
< tuple(const tuple& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5),
< _M_t6(__in._M_t6), _M_t7(__in._M_t7), _M_t8(__in._M_t8),
< _M_t9(__in._M_t9)
< { }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5, typename _Up6, typename _Up7,
< typename _Up8, typename _Up9>
< tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8,
< _Up9>& __in):
< _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2),
< _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5),
< _M_t6(__in._M_t6), _M_t7(__in._M_t7), _M_t8(__in._M_t8),
< _M_t9(__in._M_t9)
< { }
<
< tuple&
< operator=(const tuple& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< _M_t6=__in._M_t6;
< _M_t7=__in._M_t7;
< _M_t8=__in._M_t8;
< _M_t9=__in._M_t9;
< return *this;
< }
<
< template<typename _Up0, typename _Up1, typename _Up2, typename _Up3,
< typename _Up4, typename _Up5, typename _Up6, typename _Up7,
< typename _Up8, typename _Up9>
< tuple&
< operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7,
< _Up8, _Up9>& __in)
< {
< _M_t0=__in._M_t0;
< _M_t1=__in._M_t1;
< _M_t2=__in._M_t2;
< _M_t3=__in._M_t3;
< _M_t4=__in._M_t4;
< _M_t5=__in._M_t5;
< _M_t6=__in._M_t6;
< _M_t7=__in._M_t7;
< _M_t8=__in._M_t8;
< _M_t9=__in._M_t9;
< return *this;
< }
<
< template<int __i, typename _Up>
< friend class __get_helper;
< template<typename, typename, typename, typename, typename, typename,
< typename, typename, typename, typename>
< friend class tuple;
< };
---
> template<typename Tp>
> struct __add_ref<Tp&>
> { typedef Tp& type; };
936c100
< template<int __i, typename _Tp>
---
> template<int i, typename Tp>
939,1058d102
< template<typename _Tp>
< struct __get_helper<0, _Tp>
< {
< static typename __add_ref<typename tuple_element<0, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t0; }
<
< static typename __add_c_ref<typename tuple_element<0, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t0; }
< };
<
< template<typename _Tp>
< struct __get_helper<1, _Tp>
< {
< static typename __add_ref<typename tuple_element<1, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t1; }
<
< static typename __add_c_ref<typename tuple_element<1, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t1; }
< };
<
< template<typename _Tp>
< struct __get_helper<2, _Tp>
< {
< static typename __add_ref<typename tuple_element<2, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t2; }
<
< static typename __add_c_ref<typename tuple_element<2, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t2; }
< };
<
< template<typename _Tp>
< struct __get_helper<3, _Tp>
< {
< static typename __add_ref<typename tuple_element<3, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t3; }
<
< static typename __add_c_ref<typename tuple_element<3, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t3; }
< };
<
< template<typename _Tp>
< struct __get_helper<4, _Tp>
< {
< static typename __add_ref<typename tuple_element<4, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t4; }
<
< static typename __add_c_ref<typename tuple_element<4, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t4; }
< };
<
< template<typename _Tp>
< struct __get_helper<5, _Tp>
< {
< static typename __add_ref<typename tuple_element<5, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t5; }
<
< static typename __add_c_ref<typename tuple_element<5, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t5; }
< };
<
< template<typename _Tp>
< struct __get_helper<6, _Tp>
< {
< static typename __add_ref<typename tuple_element<6, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t6; }
<
< static typename __add_c_ref<typename tuple_element<6, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t6; }
< };
<
< template<typename _Tp>
< struct __get_helper<7, _Tp>
< {
< static typename __add_ref<typename tuple_element<7, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t7; }
<
< static typename __add_c_ref<typename tuple_element<7, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t7; }
< };
<
< template<typename _Tp>
< struct __get_helper<8, _Tp>
< {
< static typename __add_ref<typename tuple_element<8, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t8; }
<
< static typename __add_c_ref<typename tuple_element<8, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t8; }
< };
<
< template<typename _Tp>
< struct __get_helper<9, _Tp>
< {
< static typename __add_ref<typename tuple_element<9, _Tp>::type>::type
< get_value(_Tp& __in)
< { return __in._M_t9; }
<
< static typename __add_c_ref<typename tuple_element<9, _Tp>::type>::type
< get_value(const _Tp& __in)
< { return __in._M_t9; }
< };
<
1061,1073c105,109
< template<int __i, typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< typename __add_ref<typename tuple_element<__i, tuple<_Tp0, _Tp1, _Tp2,
< _Tp3, _Tp4, _Tp5,
< _Tp6, _Tp7, _Tp8,
< _Tp9> >::type>::type
< get(tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8,
< _Tp9>& __t)
< {
< return __get_helper<__i, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >::get_value(__t);
< }
---
> template<int i, _UNROLL_MAX_PARAMETER(_TYPENAME_T)>
> typename __add_ref<typename tuple_element<i, tuple<
> _UNROLL_MAX_PARAMETER(_TP_EXP)> >::type>::type
> get(tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)>& t)
> { return __get_helper<i, tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)> >::get_value(t); }
1077,1089c113,117
< template<int __i, typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< typename __add_c_ref<typename tuple_element<__i, tuple<_Tp0, _Tp1, _Tp2,
< _Tp3, _Tp4, _Tp5,
< _Tp6, _Tp7, _Tp8,
< _Tp9> >::type>::type
< get(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8,
< _Tp9>& __t)
< {
< return __get_helper<__i, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9> >::get_value(__t);
< }
---
> template<int i, _UNROLL_MAX_PARAMETER(_TYPENAME_T)>
> typename __add_c_ref<typename tuple_element<i, tuple<
> _UNROLL_MAX_PARAMETER(_TP_EXP)> >::type>::type
> get(const tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)>& t)
> { return __get_helper<i, tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)> >::get_value(t); }
1092c120
< template<int __check_equal_size, int __i, int __j, typename _Tp, typename _Up>
---
> template<int check_equal_size, int i, int j, typename Tp, typename Up>
1095,1096c123,124
< template<int __i, int __j, typename _Tp, typename _Up>
< struct __tuple_compare<0, __i, __j, _Tp, _Up>
---
> template<int i, int j, typename Tp, typename Up>
> struct __tuple_compare<0, i, j, Tp, Up>
1098c126
< static bool __eq(const _Tp& __t, const _Up& __u)
---
> static bool __eq(const Tp& t, const Up& u)
1100,1101c128,129
< return get<__i>(__t) == get<__i>(__u) &&
< __tuple_compare<0, __i+1, __j, _Tp, _Up>::__eq(__t, __u);
---
> return get<i>(t) == get<i>(u) &&
> __tuple_compare<0, i+1, j, Tp, Up>::__eq(t, u);
1103c131
< static bool __less(const _Tp& __t, const _Up& __u)
---
> static bool __less(const Tp& t, const Up& u)
1105,1106c133,134
< return (get<__i>(__t) < get<__i>(__u)) || !(get<__i>(__u) < get<__i>(__t)) &&
< __tuple_compare<0, __i+1, __j, _Tp, _Up>::__less(__t, __u);
---
> return (get<i>(t) < get<i>(u)) || !(get<i>(u) < get<i>(t)) &&
> __tuple_compare<0, i+1, j, Tp, Up>::__less(t, u);
1110,1111c138,139
< template<int __i, typename _Tp, typename _Up>
< struct __tuple_compare<0, __i, __i, _Tp, _Up>
---
> template<int i, typename Tp, typename Up>
> struct __tuple_compare<0, i, i, Tp, Up>
1113c141
< static bool __eq(const _Tp&, const _Up&)
---
> static bool __eq(const Tp&, const Up&)
1115c143
< static bool __less(const _Tp&, const _Up&)
---
> static bool __less(const Tp&, const Up&)
1119,1198c147,199
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9, typename _Up0, typename _Up1,
< typename _Up2, typename _Up3, typename _Up4, typename _Up5,
< typename _Up6, typename _Up7, typename _Up8, typename _Up9>
< bool
< operator==(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t,
< const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u)
< {
< typedef tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8,
< _Tp9> _Tp;
< typedef tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8,
< _Up9> _Up;
< return __tuple_compare<tuple_size<_Tp>::value -
< tuple_size<_Tp>::value, 0,
< tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u);
< }
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9, typename _Up0, typename _Up1,
< typename _Up2, typename _Up3, typename _Up4, typename _Up5,
< typename _Up6, typename _Up7, typename _Up8, typename _Up9>
< bool
< operator<(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t,
< const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u)
< {
< typedef tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8,
< _Tp9> _Tp;
< typedef tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8,
< _Up9> _Up;
< return __tuple_compare<tuple_size<_Tp>::value -
< tuple_size<_Tp>::value, 0,
< tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u);
< }
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9, typename _Up0, typename _Up1,
< typename _Up2, typename _Up3, typename _Up4, typename _Up5,
< typename _Up6, typename _Up7, typename _Up8, typename _Up9>
< bool
< operator!=(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t,
< const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u)
< {
< return !(__t == __u);
< }
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9, typename _Up0, typename _Up1,
< typename _Up2, typename _Up3, typename _Up4, typename _Up5,
< typename _Up6, typename _Up7, typename _Up8, typename _Up9>
< bool
< operator>(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t,
< const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u)
< {
< return __u < __t;
< }
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9, typename _Up0, typename _Up1,
< typename _Up2, typename _Up3, typename _Up4, typename _Up5,
< typename _Up6, typename _Up7, typename _Up8, typename _Up9>
< bool
< operator<=(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t,
< const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u)
< {
< return !(__u < __t);
< }
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9, typename _Up0, typename _Up1,
< typename _Up2, typename _Up3, typename _Up4, typename _Up5,
< typename _Up6, typename _Up7, typename _Up8, typename _Up9>
< bool
< operator>=(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t,
< const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u)
< {
< return !(__t < __u);
< }
---
> template<_UNROLL_MAX_PARAMETER(_TYPENAME_T),
> _UNROLL_MAX_PARAMETER(_TYPENAME_U)>
> bool
> operator==(const tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)>& t,
> const tuple<_UNROLL_MAX_PARAMETER(_UP_EXP)>& u)
> {
> typedef tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)> Tp;
> typedef tuple<_UNROLL_MAX_PARAMETER(_UP_EXP)> Up;
> return __tuple_compare<tuple_size<Tp>::value -
> tuple_size<Tp>::value, 0,
> tuple_size<Tp>::value, Tp, Up>::__eq(t, u);
> }
>
> template<_UNROLL_MAX_PARAMETER(_TYPENAME_T),
> _UNROLL_MAX_PARAMETER(_TYPENAME_U)>
> bool
> operator<(const tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)>& t,
> const tuple<_UNROLL_MAX_PARAMETER(_UP_EXP)>& u)
> {
> typedef tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)> Tp;
> typedef tuple<_UNROLL_MAX_PARAMETER(_UP_EXP)> Up;
> return __tuple_compare<tuple_size<Tp>::value -
> tuple_size<Tp>::value, 0,
> tuple_size<Tp>::value, Tp, Up>::__less(t, u);
> }
>
> template<_UNROLL_MAX_PARAMETER(_TYPENAME_T),
> _UNROLL_MAX_PARAMETER(_TYPENAME_U)>
> bool
> operator!=(const tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)>& t,
> const tuple<_UNROLL_MAX_PARAMETER(_UP_EXP)>& u)
> { return !(t == u); }
>
> template<_UNROLL_MAX_PARAMETER(_TYPENAME_T),
> _UNROLL_MAX_PARAMETER(_TYPENAME_U)>
> bool
> operator>(const tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)>& t,
> const tuple<_UNROLL_MAX_PARAMETER(_UP_EXP)>& u)
> { return u < t; }
>
> template<_UNROLL_MAX_PARAMETER(_TYPENAME_T),
> _UNROLL_MAX_PARAMETER(_TYPENAME_U)>
> bool
> operator<=(const tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)>& t,
> const tuple<_UNROLL_MAX_PARAMETER(_UP_EXP)>& u)
> { return !(u < t); }
>
> template<_UNROLL_MAX_PARAMETER(_TYPENAME_T),
> _UNROLL_MAX_PARAMETER(_TYPENAME_U)>
> bool
> operator>=(const tuple<_UNROLL_MAX_PARAMETER(_TP_EXP)>& t,
> const tuple<_UNROLL_MAX_PARAMETER(_UP_EXP)>& u)
> { return !(t < u); }
1201c202
< template<typename _Tp>
---
> template<typename Tp>
1203,1281c204
< {
< typedef _Tp __type;
< };
<
< template<typename _Tp>
< struct __strip_reference_wrapper<reference_wrapper<_Tp> >
< {
< typedef _Tp& __type;
< };
<
< template<typename _Tp>
< struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
< {
< typedef _Tp& __type;
< };
<
< template<typename _Tp0 = _NullClass, typename _Tp1 = _NullClass,
< typename _Tp2 = _NullClass, typename _Tp3 = _NullClass,
< typename _Tp4 = _NullClass, typename _Tp5 = _NullClass,
< typename _Tp6 = _NullClass, typename _Tp7 = _NullClass,
< typename _Tp8 = _NullClass, typename _Tp9 = _NullClass>
< struct __stripped_tuple_type
< {
< typedef tuple<typename __strip_reference_wrapper<_Tp0>::__type,
< typename __strip_reference_wrapper<_Tp1>::__type,
< typename __strip_reference_wrapper<_Tp2>::__type,
< typename __strip_reference_wrapper<_Tp3>::__type,
< typename __strip_reference_wrapper<_Tp4>::__type,
< typename __strip_reference_wrapper<_Tp5>::__type,
< typename __strip_reference_wrapper<_Tp6>::__type,
< typename __strip_reference_wrapper<_Tp7>::__type,
< typename __strip_reference_wrapper<_Tp8>::__type,
< typename __strip_reference_wrapper<_Tp9>::__type> __type;
< };
<
< tuple<>
< make_tuple()
< { return tuple<>(); }
<
< template< typename _Tp0>
< typename __stripped_tuple_type< _Tp0>::__type
< make_tuple( _Tp0 __t0)
< {
< return typename __stripped_tuple_type< _Tp0>::
< __type( __t0);
< }
<
< template<typename _Tp0, typename _Tp1>
< typename __stripped_tuple_type<_Tp0, _Tp1>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1>::
< __type(__t0, __t1);
< }
<
< template<typename _Tp0, typename _Tp1, typename _Tp2>
< typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2>::
< __type(__t0, __t1, __t2);
< }
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3>
< typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3>::
< __type(__t0, __t1, __t2, __t3);
< }
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4>
< typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4>::
< __type(__t0, __t1, __t2, __t3, __t4);
< }
---
> { typedef Tp __type; };
1283,1293c206,208
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5>
< typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4,
< _Tp5>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4,
< _Tp5 __t5)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4,
< _Tp5>::
< __type(__t0, __t1, __t2, __t3, __t4, __t5);
< }
---
> template<typename Tp>
> struct __strip_reference_wrapper<reference_wrapper<Tp> >
> { typedef Tp& __type; };
1295,1305c210,212
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6>
< typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5,
< _Tp6>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4,
< _Tp5 __t5, _Tp6 __t6)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4,
< _Tp5, _Tp6>::
< __type(__t0, __t1, __t2, __t3, __t4, __t5, __t6);
< }
---
> template<typename Tp>
> struct __strip_reference_wrapper<const reference_wrapper<Tp> >
> { typedef Tp& __type; };
1307,1317c214
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7>
< typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4,
< _Tp5 __t5, _Tp6 __t6, _Tp7 __t7)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4,
< _Tp5, _Tp6, _Tp7>::
< __type(__t0, __t1, __t2, __t3, __t4, __t5, __t6, __t7);
< }
---
> #define _STRIP_REF(_Val) typename __strip_reference_wrapper<Tp##_Val>::__type
1319,1330c216,218
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8>
< typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4,
< _Tp5 __t5, _Tp6 __t6, _Tp7 __t7, _Tp8 __t8)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4,
< _Tp5, _Tp6, _Tp7, _Tp8>::
< __type(__t0, __t1, __t2, __t3, __t4, __t5, __t6, __t7, __t8);
< }
---
> template<_UNROLL_MAX_PARAMETER(_NULLCLASS)>
> struct __stripped_tuple_type
> { typedef tuple<_UNROLL_MAX_PARAMETER(_STRIP_REF)> __type; };
1332,1343c220
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6,
< _Tp7, _Tp8, _Tp9>::__type
< make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4,
< _Tp5 __t5, _Tp6 __t6, _Tp7 __t7, _Tp8 __t8, _Tp9 __t9)
< {
< return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4,
< _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>::
< __type(__t0, __t1, __t2, __t3, __t4, __t5, __t6, __t7, __t8, __t9);
< }
---
> #undef _STRIP_REF
1361,1452c238,244
<
< // Forms a tuple of references to a list of variables.
< template< typename _Tp0>
< tuple< _Tp0&>
< tie( _Tp0& __t0)
< {
< return make_tuple( ref(__t0));
< };
<
< template<typename _Tp0, typename _Tp1>
< tuple<_Tp0&, _Tp1&>
< tie(_Tp0& __t0, _Tp1& __t1)
< {
< return make_tuple(ref(__t0), ref(__t1));
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2>
< tuple<_Tp0&, _Tp1&, _Tp2&>
< tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2)
< {
< return make_tuple(ref(__t0), ref(__t1), ref(__t2));
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3>
< tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&>
< tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3)
< {
< return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3));
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4>
< tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&>
< tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4)
< {
< return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3),
< ref(__t4));
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5>
< tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&>
< tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4,
< _Tp5& __t5)
< {
< return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4),
< ref(__t5));
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6>
< tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&, _Tp6&>
< tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, _Tp5& __t5,
< _Tp6& __t6)
< {
< return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4),
< ref(__t5), ref(__t6));
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7>
< tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&, _Tp6&, _Tp7&>
< tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, _Tp5& __t5,
< _Tp6& __t6, _Tp7& __t7)
< {
< return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4),
< ref(__t5), ref(__t6), ref(__t7));
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8>
< tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&, _Tp6&, _Tp7&, _Tp8&>
< tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, _Tp5& __t5,
< _Tp6& __t6, _Tp7& __t7, _Tp8& __t8)
< {
< return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4),
< ref(__t5), ref(__t6), ref(__t7), ref(__t8));
< };
<
< template<typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
< typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
< typename _Tp8, typename _Tp9>
< tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&, _Tp6&, _Tp7&, _Tp8&,
< _Tp9&>
< tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, _Tp5& __t5,
< _Tp6& __t6, _Tp7& __t7, _Tp8& __t8, _Tp9& __t9)
< {
< return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4),
< ref(__t5), ref(__t6), ref(__t7), ref(__t8),
< ref(__t9));
< };
---
> #define _LOOPMAX _GLIBCXX_TUPLE_MAX
> #define _LOOP_FILE "tuple_loop.h"
> // Using the above two lines, this will include tuple_loop.h
> // _GLIBCXX_TUPLE_MAX times,generating all the instances of the
> // tuple class and all functions which have to be created multiple
> // times.
> #include "preprocessor_loop.h"
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/include/tr1/tuple_loop.h libstdc++-v3.cvs/include/tr1/tuple_loop.h
0a1,203
> // tuple internals -*- C++ -*-
>
> // Copyright (C) 2004, 2005 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 2, or (at your option)
> // any later version.
>
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> // GNU General Public License for more details.
>
> // You should have received a copy of the GNU General Public License along
> // with this library; see the file COPYING. If not, write to the Free
> // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> // USA.
>
> // As a special exception, you may use this file as part of a free software
> // library without restriction. Specifically, if other files instantiate
> // templates or use macros or inline functions from this file, or you compile
> // this file and link it with other files to produce an executable, this
> // file does not by itself cause the resulting executable to be covered by
> // the GNU General Public License. This exception does not however
> // invalidate any other reasons why the executable file might be covered by
> // the GNU General Public License.
>
> // This file is designed to be included via preprocessor_loop.h, in
> // tr1/tuple. It will be included once for each size of tuple which is
> // required. Look in preprocessor_loop.h for how this looping occurs.
>
> // Some frequently used macros
> #define _UNROLL_PARAMETER(_Val) _GLIBCXX_PRE_LOOP(0, _LOOPVAL, _Val, _GLIBCXX_PRE_COMMA)
> #define _UNROLL_FUNCTION(_Val) _GLIBCXX_PRE_LOOP(0, _LOOPVAL, _Val, _GLIBCXX_PRE_EMPTY)
>
> #if _LOOPVAL == 0
> #define _PARAMETER_LIST _GLIBCXX_PRE_LOOP(_LOOPVAL, _LOOPMAX, \
> _PLAIN_NULLCLASS, _GLIBCXX_PRE_COMMA)
> #else
> #define _PARAMETER_LIST _GLIBCXX_PRE_LOOP(0, _LOOPVAL, _TP_EXP, \
> _GLIBCXX_PRE_COMMA) \
> _GLIBCXX_PRE_IF(_GLIBCXX_PRE_EQUAL(_LOOPVAL, _LOOPMAX), \
> _GLIBCXX_PRE_EMPTY, _GLIBCXX_PRE_COMMA)() \
> _GLIBCXX_PRE_LOOP(_LOOPVAL, _LOOPMAX, _PLAIN_NULLCLASS, _GLIBCXX_PRE_COMMA)
> #endif
>
> #ifdef _LASTLOOP
> /// @brief class tuple_element
> #endif
> template<_GLIBCXX_PRE_LOOP(0, _LOOPMAX, _TYPENAME_T, _GLIBCXX_PRE_COMMA)>
> struct tuple_element<_LOOPVAL, tuple<
> _GLIBCXX_PRE_LOOP(0, _LOOPMAX, _TP_EXP, _GLIBCXX_PRE_COMMA)> >
> { typedef _GLIBCXX_PRE_CAT(Tp,_LOOPVAL) type; };
>
> #ifdef _LASTLOOP
> /// @brief class tuple_size
> #endif
>
> template<_UNROLL_PARAMETER(_TYPENAME_T)>
> struct tuple_size<tuple<_PARAMETER_LIST> >
> { static const int value = _LOOPVAL; };
>
> template<_UNROLL_PARAMETER(_TYPENAME_T)>
> class tuple<_PARAMETER_LIST>
> {
>
> #define _VARIABLE_LIST(_Val) Tp##_Val M_t##_Val;
> _UNROLL_FUNCTION(_VARIABLE_LIST)
> #undef _VARIABLE_LIST
>
> public:
> tuple()
> { }
>
> #if _LOOPVAL>0
> #define _ADD_C_REF(_Val) typename __add_c_ref<Tp##_Val>::type in##_Val
> #define _INIT_LIST(_Val) M_t##_Val(in##_Val)
>
> explicit tuple(_UNROLL_PARAMETER(_ADD_C_REF)):
> _UNROLL_PARAMETER(_INIT_LIST)
> { }
>
> #undef _ADD_C_REF
> #undef _INIT_LIST
> #endif
>
> #if _LOOPVAL==2
> template<class Up1, class Up2>
> tuple(const std::pair<Up1, Up2>& u):
> M_t0(u.first), M_t1(u.second)
> { }
> #endif
>
> #define _INIT_LIST(_Val) M_t##_Val(in.M_t##_Val)
> #define _LIST_U(_Val) _GLIBCXX_PRE_CAT(Up,_Val)
>
> #if _LOOPVAL>0
> tuple(const tuple& in):
> _UNROLL_PARAMETER(_INIT_LIST)
> { }
>
> template<_UNROLL_PARAMETER(_TYPENAME_U)>
> tuple(const tuple<_UNROLL_PARAMETER(_LIST_U)>& in):
> _UNROLL_PARAMETER(_INIT_LIST)
> { }
> #else
> tuple(const tuple& in)
> { }
> #endif
>
> #undef _INIT_LIST
>
> #define _ASSIGN_LIST(_Val) M_t##_Val=in.M_t##_Val;
>
> tuple&
> operator=(const tuple& in)
> {
> _UNROLL_FUNCTION(_ASSIGN_LIST)
> return *this;
> }
>
> #if _LOOPVAL>0
> template<_UNROLL_PARAMETER(_TYPENAME_U)>
> tuple&
> operator=(const tuple<_UNROLL_PARAMETER(_LIST_U)>& in)
> {
> _UNROLL_FUNCTION(_ASSIGN_LIST)
> return *this;
> }
> #endif
> #undef _LIST_U
> #undef _ASSIGN_LIST
>
> #define _PLAIN_TYPENAME(x) typename
>
> template<int i, typename Up>
> friend class __get_helper;
> template<_GLIBCXX_PRE_LOOP(0, _LOOPMAX, _PLAIN_TYPENAME,
> _GLIBCXX_PRE_COMMA)>
> friend class tuple;
> };
>
> template<typename Tp>
> struct __get_helper<_LOOPVAL, Tp>
> {
> static typename __add_ref<typename tuple_element<_LOOPVAL, Tp>
> ::type>::type
> get_value(Tp& in)
> { return in._GLIBCXX_PRE_CAT(M_t,_LOOPVAL); }
>
> static typename __add_c_ref<typename tuple_element<_LOOPVAL, Tp>
> ::type>::type
> get_value(const Tp& in)
> { return in._GLIBCXX_PRE_CAT(M_t, _LOOPVAL); }
> };
>
> #if _LOOPVAL>0
> #define _INPUT_LIST(_Val) _GLIBCXX_PRE_CAT(Tp, _Val) _GLIBCXX_PRE_CAT(t, _Val)
> #define _VARIABLE_LIST(_Val) _GLIBCXX_PRE_CAT(t, _Val)
>
> template<_UNROLL_PARAMETER(_TYPENAME_T)>
> typename __stripped_tuple_type<_UNROLL_PARAMETER(_TP_EXP)>::__type
> make_tuple(_UNROLL_PARAMETER(_INPUT_LIST))
> {
> return typename __stripped_tuple_type<_UNROLL_PARAMETER(_TP_EXP)>::
> __type(_UNROLL_PARAMETER(_VARIABLE_LIST));
> }
>
> #undef _INPUT_LIST
> #undef _VARIABLE_LIST
> #else
> tuple<>
> make_tuple()
> { return tuple<>(); }
> #endif
>
> #if _LOOPVAL>0
> #define _TIE_INPUT_LIST(_Val) _GLIBCXX_PRE_CAT(Tp,_Val)& _GLIBCXX_PRE_CAT(t,_Val)
> #define _TIE_ADD_REF_WRAP(_Val) ref(_GLIBCXX_PRE_CAT(t,_Val))
> #define _TYPE_REFERENCE(_Val) _GLIBCXX_PRE_CAT(Tp,_Val)&
> // Forms a tuple of references to a list of variables.
> template<_UNROLL_PARAMETER(_TYPENAME_T)>
> tuple<_UNROLL_PARAMETER(_TYPE_REFERENCE)>
> tie(_UNROLL_PARAMETER(_TIE_INPUT_LIST))
> {
> return make_tuple(_UNROLL_PARAMETER(_TIE_ADD_REF_WRAP));
> }
>
> #undef _TIE_INPUT_LIST
> #undef _TIE_ADD_REF_WRAP
> #undef _TYPE_REFERENCE
> #else
> tuple<>
> tie()
> { return make_tuple(); }
> #endif
>
> #undef _PLAIN_TYPENAME
> #undef _UNROLL_PARAMETER
> #undef _UNROLL_FUNCTION
> #undef _PARAMETER_LIST
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/testsuite/ext/preprocessor/equal.cc libstdc++-v3.cvs/testsuite/ext/preprocessor/equal.cc
0a1,46
> // Copyright (C) 2005 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 2, or (at your option)
> // any later version.
>
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> // GNU General Public License for more details.
>
> // You should have received a copy of the GNU General Public License along
> // with this library; see the file COPYING. If not, write to the Free
> // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> // USA.
>
> // As a special exception, you may use this file as part of a free software
> // library without restriction. Specifically, if other files instantiate
> // templates or use macros or inline functions from this file, or you compile
> // this file and link it with other files to produce an executable, this
> // file does not by itself cause the resulting executable to be covered by
> // the GNU General Public License. This exception does not however
> // invalidate any other reasons why the executable file might be covered by
> // the GNU General Public License.
>
> #include <tr1/preprocessor.h>
> #include <testsuite_hooks.h>
>
> #define FOO 1
> #define BAR 1
>
> void
> test01()
> {
> VERIFY(_GLIBCXX_PRE_EQUAL(0, 0) && _GLIBCXX_PRE_EQUAL(1, 1));
> VERIFY(!_GLIBCXX_PRE_EQUAL(0, 1) && !_GLIBCXX_PRE_EQUAL(1, 0));
> VERIFY(_GLIBCXX_PRE_EQUAL(FOO, BAR));
> VERIFY(_GLIBCXX_PRE_EQUAL(_GLIBCXX_PRE_INC(FOO),
> _GLIBCXX_PRE_INC(BAR)));
> }
>
> int
> main()
> { test01(); }
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/testsuite/ext/preprocessor/if.cc libstdc++-v3.cvs/testsuite/ext/preprocessor/if.cc
0a1,46
> // Copyright (C) 2005 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 2, or (at your option)
> // any later version.
>
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> // GNU General Public License for more details.
>
> // You should have received a copy of the GNU General Public License along
> // with this library; see the file COPYING. If not, write to the Free
> // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> // USA.
>
> // As a special exception, you may use this file as part of a free software
> // library without restriction. Specifically, if other files instantiate
> // templates or use macros or inline functions from this file, or you compile
> // this file and link it with other files to produce an executable, this
> // file does not by itself cause the resulting executable to be covered by
> // the GNU General Public License. This exception does not however
> // invalidate any other reasons why the executable file might be covered by
> // the GNU General Public License.
>
> #include <tr1/preprocessor.h>
> #include <testsuite_hooks.h>
>
> void
> test01()
> {
> VERIFY(_GLIBCXX_PRE_IF(0, 1, 2) == 2);
> VERIFY(_GLIBCXX_PRE_IF(1, 1, 2) == 1);
> int a[] = {4 _GLIBCXX_PRE_IF(1, _GLIBCXX_PRE_COMMA,
> _GLIBCXX_PRE_EMPTY)() 4};
> int b[] = {4 _GLIBCXX_PRE_IF(0, _GLIBCXX_PRE_COMMA,
> _GLIBCXX_PRE_EMPTY)()};
> VERIFY(sizeof(a)/sizeof(int) == 2);
> VERIFY(sizeof(b)/sizeof(int) == 1);
> }
>
> int
> main()
> { test01(); }
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/testsuite/ext/preprocessor/inc.cc libstdc++-v3.cvs/testsuite/ext/preprocessor/inc.cc
0a1,37
> // Copyright (C) 2005 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 2, or (at your option)
> // any later version.
>
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> // GNU General Public License for more details.
>
> // You should have received a copy of the GNU General Public License along
> // with this library; see the file COPYING. If not, write to the Free
> // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> // USA.
>
> // As a special exception, you may use this file as part of a free software
> // library without restriction. Specifically, if other files instantiate
> // templates or use macros or inline functions from this file, or you compile
> // this file and link it with other files to produce an executable, this
> // file does not by itself cause the resulting executable to be covered by
> // the GNU General Public License. This exception does not however
> // invalidate any other reasons why the executable file might be covered by
> // the GNU General Public License.
>
> #include <tr1/preprocessor.h>
> #include <testsuite_hooks.h>
>
> void
> test01()
> { VERIFY(_GLIBCXX_PRE_INC(0) == 1 && _GLIBCXX_PRE_INC(10) == 11); }
>
> int
> main()
> { test01(); }
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/testsuite/ext/preprocessor/loop.cc libstdc++-v3.cvs/testsuite/ext/preprocessor/loop.cc
0a1,44
> // Copyright (C) 2005 Free Software Foundation, Inc.
> //
> // This file is part of the GNU ISO C++ Library. This library is free
> // software; you can redistribute it and/or modify it under the
> // terms of the GNU General Public License as published by the
> // Free Software Foundation; either version 2, or (at your option)
> // any later version.
>
> // This library is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> // GNU General Public License for more details.
>
> // You should have received a copy of the GNU General Public License along
> // with this library; see the file COPYING. If not, write to the Free
> // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> // USA.
>
> // As a special exception, you may use this file as part of a free software
> // library without restriction. Specifically, if other files instantiate
> // templates or use macros or inline functions from this file, or you compile
> // this file and link it with other files to produce an executable, this
> // file does not by itself cause the resulting executable to be covered by
> // the GNU General Public License. This exception does not however
> // invalidate any other reasons why the executable file might be covered by
> // the GNU General Public License.
>
> #include <tr1/preprocessor.h>
> #include <testsuite_hooks.h>
>
> #define VALUE(x) x
>
> void
> test01()
> {
> int a[]={ _GLIBCXX_PRE_LOOP(0, 3, VALUE, _GLIBCXX_PRE_COMMA), 100 };
> int b[]={ _GLIBCXX_PRE_LOOP(2, 3, VALUE, _GLIBCXX_PRE_COMMA), 100 };
> VERIFY(a[0] == 0 && a[1] == 1 && a[2] == 2 && a[3] == 100);
> VERIFY(b[0] == 2 && b[1] == 100);
> }
>
> int
> main()
> { test01(); }
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc libstdc++-v3.cvs/testsuite/tr1/6_containers/tuple/creation_functions/make_tuple.cc
35a36
> tuple<> t = make_tuple();
diff -rN --exclude='*CVS*' libstdc++-v3.cvs.clean/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc libstdc++-v3.cvs/testsuite/tr1/6_containers/tuple/creation_functions/tie.cc
41a42
> tuple<> t = tie();