Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Value_Traits_T.h
blob1be9dd82ccded4632c271f986a8d65aabdc47bda
1 #ifndef guard_value_traits_hpp
2 #define guard_value_traits_hpp
3 /**
4 * @file
6 * @brief Implement the element manipulation traits for types with
7 * value-like semantics.
9 * @author Carlos O'Ryan
12 #include /**/ "tao/Versioned_Namespace.h"
14 #include <algorithm>
16 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
18 namespace TAO
20 namespace details
22 template<typename T, bool dummy>
23 struct value_traits
25 typedef T value_type;
26 typedef T const const_value_type;
28 inline static void zero_range(
29 value_type * begin , value_type * end)
31 std::fill(begin, end, value_type ());
34 inline static void initialize_range(
35 value_type * begin, value_type * end)
37 std::fill(begin, end, value_type ());
40 inline static void release_range(
41 value_type *, value_type *)
43 // Noop for value sequences
46 // Allow MSVC++ >= 8 checked iterators to be used.
47 template <typename iter>
48 inline static void copy_range(
49 value_type * begin, value_type * end, iter dst)
51 std::copy(begin, end, dst);
54 // Allow MSVC++ >= 8 checked iterators to be used.
55 template <typename iter>
56 inline static void copy_swap_range(
57 value_type * begin, value_type * end, iter dst)
59 copy_range(begin, end, dst);
62 } // namespace details
63 } // namespace CORBA
65 TAO_END_VERSIONED_NAMESPACE_DECL
67 #endif // guard_value_traits_hpp