genericopenlibs/cppstdlib/stl/test/unit/iota.h
changeset 31 ce057bb09d0b
child 34 5fae379060a7
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef IOTA_H
       
    20 #define IOTA_H
       
    21 
       
    22 #include <numeric>
       
    23 
       
    24 #ifdef __SYMBIAN32__
       
    25 using std::iota;
       
    26 #endif // __SYMBIAN32__
       
    27 
       
    28 //iota definition used in unit test
       
    29 template <typename _It, typename _Tp>
       
    30 void __iota(_It __first, _It __last, _Tp __val) {
       
    31 #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
       
    32   iota(__first, __last, __val);
       
    33 #else
       
    34   while (__first != __last) {
       
    35     *__first++ = __val++;
       
    36   }
       
    37 #endif
       
    38 }
       
    39 
       
    40 #endif