transform_iterator( Iterator const& x ) ???

I'm not sure why I never saw this on the list, but since I saw the moderation request and I figure you deserve a reply... boost-owner@lists.boost.org writes:
From: "Sascha" <vudu@gmx.net> Subject: boost::transform_iterator( Iterator const& x ) ??? To: <boost@lists.boost.org> Date: Thu, 3 Jun 2004 00:22:18 +0200
hi
a simple question about the construction of boost::transform_iterator.
currently there are two ctors implemented:
transform_iterator(); transform_iterator(Iterator const& x, UnaryFunction f);
why does boost::transform_iterator(Iterator const& x) not exist leaving the function object default constructed?
Are you looking at the source code or the documentation? Oh, I see you're doing as you should and looking at the documentation! Well it turns out that the source code actually contains this constructor: explicit transform_iterator(Iterator const& x) : super_t(x) { // don't provide this constructor if UnaryFunction is a // function pointer type, since it will be 0. Too dangerous. BOOST_STATIC_ASSERT(is_class<UnaryFunction>::value); }
can I add it without getting in trouble?
No, but we can fix the documentation ;-) -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (1)
-
David Abrahams