Topic: Inserting basic_string


Author: tony@online.tmx.com.au (Tony Cook)
Date: 1996/09/23
Raw View
James Kanze US/ESC 60/3/141 #40763 (kanze@lts.sel.alcatel.de) wrote:
: In article <51jkgn$6s6@news.tmx.com.au> tony@online.tmx.com.au (Tony
: Cook) writes:

: |> [ comment on operator<<(basic_ostream<>, const basic_string<>)
: |> omitted]

: The September 1995 also makes it illegal to input "1.3" to a double,
: since it requires an exact conversion.

: I think that although it is generally clear what iostream should do, the
: exact description in the current public versions of the draft is still
: undergoing extensive rework.  For the moment, I have a fair degree of
: confidence in the committee members,

As do I.  (And to those committee members who are reading this,
thank you for your hard work.)

: and I think that we will just have
: to wait for the next public draft before really commenting too much.

True.

Truth is, I was preparing a defect report for a vendor, and checked
the latest draft I had - and the standard specified the behaviour
that the vendor was implementing.

--
        Tony Cook - tony@online.tmx.com.au
                    100237.3425@compuserve.com
---
[ 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
]





Author: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
Date: 1996/09/17
Raw View
In article <51jkgn$6s6@news.tmx.com.au> tony@online.tmx.com.au (Tony
Cook) writes:

|> The September 1995 Working Paper states that [1]:

|>   template<class charT, class OS_traits,
|>                  class STR_traits, class STR_Alloc>
|>     basic_ostream<charT, OS_traits>&
|>       operator<<(basic_ostream<charT, OS_traits>& os,
|>                  const basic_string<charT,STR_traits,STR_Alloc>& str);

|> simply has the effect of:

|>  os.write(str.data(), str.size())

|> Is this meant to do the formatting described in
|> [lib.ostream.formatted.reqmts] as well?

|> If not, this strikes me as a serious inconsistency with the 'char
|> const *' inserter.

The September 1995 also makes it illegal to input "1.3" to a double,
since it requires an exact conversion.

I think that although it is generally clear what iostream should do, the
exact description in the current public versions of the draft is still
undergoing extensive rework.  For the moment, I have a fair degree of
confidence in the committee members, and I think that we will just have
to wait for the next public draft before really commenting too much.
--
James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils,    tudes et r   alisations en logiciel orient    objet --
                -- A la recherche d'une activit    dans une region francophone



[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: tony@online.tmx.com.au (Tony Cook)
Date: 1996/09/16
Raw View
The September 1995 Working Paper states that [1]:

  template<class charT, class OS_traits,
                 class STR_traits, class STR_Alloc>
    basic_ostream<charT, OS_traits>&
      operator<<(basic_ostream<charT, OS_traits>& os,
                 const basic_string<charT,STR_traits,STR_Alloc>& str);

simply has the effect of:

 os.write(str.data(), str.size())

Is this meant to do the formatting described in
[lib.ostream.formatted.reqmts] as well?

If not, this strikes me as a serious inconsistency with the 'char
const *' inserter.

[1] The April 1995 paper gives even less information.

--
        Tony Cook - tony@online.tmx.com.au
                    100237.3425@compuserve.com
---
[ 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
]