From 94a2f8ed2925e6cd0b050c941a7e32f4f9d1636c Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Tue, 13 Mar 2007 17:02:29 +0000 Subject: ChangeLogTag:Tue Mar 13 18:00:34 UTC 2007 Ossama Othman --- TAO/ChangeLog | 7 +++++++ TAO/tao/Valuetype/Valuetype_Traits_T.h | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 828207f7929..c8b44bd2034 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Tue Mar 13 18:00:34 UTC 2007 Ossama Othman + + * tao/Valuetype/Valuetype_Traits_T.h (copy_range): + + Made this trait method a member template to provide support for + checked destination iterators. + Tue Mar 13 14:17:52 UTC 2007 Johnny Willemsen * orbsvcs/tests/Bug_2800_Regression/nsmain.cpp: diff --git a/TAO/tao/Valuetype/Valuetype_Traits_T.h b/TAO/tao/Valuetype/Valuetype_Traits_T.h index f8b5ee460be..c0107c9ebb7 100644 --- a/TAO/tao/Valuetype/Valuetype_Traits_T.h +++ b/TAO/tao/Valuetype/Valuetype_Traits_T.h @@ -41,11 +41,21 @@ struct valuetype_traits_decorator std::generate(begin, end, &derived::default_initializer); } +# ifndef ACE_LACKS_MEMBER_TEMPLATES + // Allow MSVC++ >= 8 checked iterators to be used. + template + inline static void copy_range( + object_type ** begin, object_type ** end, iter dst) + { + std::transform(begin, end, dst, &derived::duplicate); + } +#else inline static void copy_range( object_type ** begin, object_type ** end, object_type ** dst) { std::transform(begin, end, dst, &derived::duplicate); } +#endif /* ACE_LACKS_MEMBER_TEMPLATES */ inline static void release_range( object_type ** begin, object_type ** end) -- cgit v1.2.1