diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-03-14 04:33:49 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-03-14 04:33:49 +0000 |
commit | 8807d87fd3d6eb76485579581ad30f74ec5335b1 (patch) | |
tree | 029ec151a811288b430655eb8be1757d5e63f084 | |
parent | db98707b63bc8ca81cd8ea0311a4edb46a22533f (diff) | |
download | ATCD-8807d87fd3d6eb76485579581ad30f74ec5335b1.tar.gz |
ChangeLogTag:Tue Mar 14 05:32:38 UTC 2007 Ossama Othman <ossama_othman at symantec dot com>
-rw-r--r-- | TAO/ChangeLog | 7 | ||||
-rw-r--r-- | TAO/tao/Array_Traits_T.h | 14 |
2 files changed, 20 insertions, 1 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index be9673d4ece..18d55cc19b6 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Tue Mar 14 05:32:38 UTC 2007 Ossama Othman <ossama_othman at symantec dot com> + + * tao/Array_Traits_T.h (copy_range): + + Made this trait method a member template to provide support for + checked destination iterators. + Tue Mar 13 20:05:54 UTC 2007 Chad Elliott <elliott_c@ociweb.com> * orbsvcs/tests/Simple_Naming/client.h: diff --git a/TAO/tao/Array_Traits_T.h b/TAO/tao/Array_Traits_T.h index 3e3178af511..76f9c5d5ea7 100644 --- a/TAO/tao/Array_Traits_T.h +++ b/TAO/tao/Array_Traits_T.h @@ -63,7 +63,18 @@ struct array_traits std::for_each( begin, end, &TAO::Array_Traits<forany_type>::zero); } - +# ifndef ACE_LACKS_MEMBER_TEMPLATES + // Allow MSVC++ >= 8 checked iterators to be used. + template <typename iter> + inline static void copy_range( + value_type * begin, value_type * end, iter dst) + { + for(value_type * i = begin; i != end; ++i, ++dst) + { + TAO::Array_Traits<forany_type>::copy(*dst, *i); + } + } +#else inline static void copy_range( value_type * begin, value_type * end, value_type *dst) { @@ -72,6 +83,7 @@ struct array_traits TAO::Array_Traits<forany_type>::copy(*dst, *i); } } +# endif /* !ACE_LACKS_MEMBER_TEMPLATES */ }; } // namespace details |