Topic: Bug in specification of deque::assign?


Author: Arch Robison <robison@kai.com>
Date: 1996/07/17
Raw View
Section 23.2.2 of the January 1996 WP defines the following:

      namespace std {
 template <class T, class Allocator = allocator>
 class deque {
 public:
 ...
   template <class Size, class T>
     void assign(Size n, const T& t = T());
 ...
      }

The inner parameter T shadows the outer T.  Notice the fragment around the "=".
To make any sense, the right-hand side T must be the outer T, but the
left-hand side must be the inner T.  Is this legal C++ or an error in the
specification of member assign?

Arch D. Robison    Kuck & Associates Inc.
robison@kai.com    1906 Fox Drive
217-356-2288       Champaign IL 61820
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]