summaryrefslogtreecommitdiff
path: root/TAO/tests/Sequence_Unit_Tests/value_traits.hpp
blob: b491b8bdabd9ce038faeea3de5ee0ddc4b88ef35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef guard_value_traits_hpp
#define guard_value_traits_hpp
/**
 * @file
 *
 * @brief Implement the element manipulation traits for types with
 * value-like semantics.
 *
 * $Id$
 *
 * @author Carlos O'Ryan
 */

#include <algorithm>

namespace TAO
{
namespace details
{

template<typename T, bool dummy>
struct value_traits
{
  typedef T value_type;
  typedef T const const_value_type;

  inline static void zero_range(
      value_type * /* begin */, value_type * /* end */)
  {}

  inline static void initialize_range(
      value_type * /* begin */, value_type * /* end */)
  {}

  inline static void copy_range(
      value_type * begin, value_type * end, value_type *dst)
  {
    std::copy(begin, end, dst);
  }
};

} // namespace details
} // namespace CORBA

#endif // guard_value_traits_hpp