genericopenlibs/cppstdlib/stl/test/unit/iota.h
changeset 0 e4d67989cc36
child 18 47c74d1534e1
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4  */
       
     5 
       
     6 #ifndef IOTA_H
       
     7 #define IOTA_H
       
     8 
       
     9 #include <numeric>
       
    10 
       
    11 #ifdef __SYMBIAN32__
       
    12 using std::iota;
       
    13 #endif // __SYMBIAN32__
       
    14 
       
    15 //iota definition used in unit test
       
    16 template <typename _It, typename _Tp>
       
    17 void __iota(_It __first, _It __last, _Tp __val) {
       
    18 #if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
       
    19   iota(__first, __last, __val);
       
    20 #else
       
    21   while (__first != __last) {
       
    22     *__first++ = __val++;
       
    23   }
       
    24 #endif
       
    25 }
       
    26 
       
    27 #endif