
What is the result type of transform if the algorithm is given two sequences of different sizes? Thanks, Eric.

"Lemings, Eric B. \(Contr\)"
What is the result type of transform if the algorithm is given two sequences of different sizes?
I think the docs imply strongly that the result sequence will be the same length as the first sequence: Complexity: Linear. Exactly ... size<s1>::value applications of op / op2 and in::operation ...although the semantics are stated in terms of pair_view, which is never defined in the docs (ahem!) As for the exact type of the result, well, MPL transformation algorithms never tell you that, regardless of the inputs. -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams writes:
"Lemings, Eric B. \(Contr\)"
writes: What is the result type of transform if the algorithm is given two sequences of different sizes?
I think the docs imply strongly that the result sequence will be the same length as the first sequence:
That was the intented semantics, but it appears that tests don't cover this case, and things don't quite work as they supposed to. I'll take a look at it.
Complexity:
Linear. Exactly ... size<s1>::value applications of op / op2 and in::operation
...although the semantics are stated in terms of pair_view, which is never defined in the docs (ahem!)
Yes, it's a known issue. -- Aleksey Gurtovoy MetaCommunications Engineering

Aleksey Gurtovoy writes:
David Abrahams writes:
"Lemings, Eric B. \(Contr\)"
writes: What is the result type of transform if the algorithm is given two sequences of different sizes?
I think the docs imply strongly that the result sequence will be the same length as the first sequence:
That was the intented semantics, but it appears that tests don't cover this case, and things don't quite work as they supposed to. I'll take a look at it.
Forgot to say that I've put it on the library TODO list: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?MPL_TODO_List -- Aleksey Gurtovoy MetaCommunications Engineering
participants (3)
-
Aleksey Gurtovoy
-
David Abrahams
-
Lemings, Eric B. (Contr)