Assignment 5 assumptions.


R. Clayton (rclayton@monmouth.edu)
(no date)


  Because the assignment operator and copy constructor are not defined for
  array-sequences, can i assume that the only way to create new array sequence
  is using the given 3 constructors?

You could, but you would be wrong; slice and concat also create new array
sequences. Besides, the assignment operator and the copy constructor are
defined - by the compiler.

  Can I assume that the array sequences returned by slice and concat cannot be
  assigned to other array sequences and so they cannot call any of the array
  sequence class member functions?

You cannot; see main.cc in the assignment directory. But even if you could
(which you can't), it would still possible to call member functions on slices
and concats: for example, the code

  array_sequence("hello").concat(array_sequence(" world")).slice(1, 2)

calls slice on a concat (ignoring the un-implemented constructor).



This archive was generated by hypermail 2.0b3 on Mon Dec 16 2002 - 22:00:05 EST