Rheolef  7.1
an efficient C++ finite element environment
misc_algo.h
Go to the documentation of this file.
1 # ifndef _RHEOLEF_MISC_ALGO_H
2 # define _RHEOLEF_MISC_ALGO_H
24 
25 #include "rheolef/config.h"
26 
27 namespace rheolef {
28 namespace algo {
29 
30 // from STL but not in std c++ lib
31 template<typename InputIterator, typename Size, typename OutputIterator>
32 OutputIterator
33 copy_n (InputIterator first, Size n, OutputIterator result)
34 {
35  for (; n > 0; --n) {
36  *result = *first;
37  ++first;
38  ++result;
39  }
40  return result;
41 }
42 
43 } // namespace algo
44 } // namespace rheolef
45 # endif /* _RHEOLEF_MISC_ALGO_H */
OutputIterator copy_n(InputIterator first, Size n, OutputIterator result)
Definition: misc_algo.h:33
This file is part of Rheolef.