os/ossrv/genericopenlibs/cppstdlib/stl/test/unit/iota.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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