diff options
Diffstat (limited to 'TAO/tao/Value_Traits_T.h')
-rw-r--r-- | TAO/tao/Value_Traits_T.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/TAO/tao/Value_Traits_T.h b/TAO/tao/Value_Traits_T.h new file mode 100644 index 00000000000..a16c7a02d89 --- /dev/null +++ b/TAO/tao/Value_Traits_T.h @@ -0,0 +1,53 @@ +#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> + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +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) + { + std::fill(begin, end, value_type ()); + } + + inline static void initialize_range( + value_type * begin, value_type * end) + { + std::fill(begin, end, value_type ()); + } + + inline static void copy_range( + value_type * begin, value_type * end, value_type *dst) + { + std::copy(begin, end, dst); + } +}; + +} // namespace details +} // namespace CORBA + +TAO_END_VERSIONED_NAMESPACE_DECL + +#endif // guard_value_traits_hpp |