Re: copy ostringstream ostream_iterator output out of order

2008-03-26 Thread Mark Wright
Hello Farid,

The fix works great, thanks very much.

Thanks, Mark

On Tue, 25 Mar 2008 16:47:16 +0200
"Farid Zaripov" <[EMAIL PROTECTED]> wrote:

> > -Original Message-
> > From: Mark Wright [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, March 25, 2008 12:42 PM
> > To: [email protected]
> > Subject: copy ostringstream ostream_iterator output out of order
> > 
> > I compile and run following the program with stdcxx compiled 
> > from subversion
> > (svn update and compiled today) with Sun Studio 12 64 bit 
> > build mode 15D:
> [...]
> > I am wondering if I am doing something wrong, as the output is
> > out of order:
> 
>   This is a definitely bug in stdcxx library.
> 
>   I have created the corresponding issue:
> https://issues.apache.org/jira/browse/STDCXX-795
> 
>   Fixed thus: http://svn.apache.org/viewvc?rev=640831&view=rev
> 
>   Thanks for the report!
> 
> Farid.

-- 


RE: copy ostringstream ostream_iterator output out of order

2008-03-25 Thread Farid Zaripov
> -Original Message-
> From: Mark Wright [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 25, 2008 12:42 PM
> To: [email protected]
> Subject: copy ostringstream ostream_iterator output out of order
> 
> I compile and run following the program with stdcxx compiled 
> from subversion
> (svn update and compiled today) with Sun Studio 12 64 bit 
> build mode 15D:
[...]
> I am wondering if I am doing something wrong, as the output is
> out of order:

  This is a definitely bug in stdcxx library.

  I have created the corresponding issue:
https://issues.apache.org/jira/browse/STDCXX-795

  Fixed thus: http://svn.apache.org/viewvc?rev=640831&view=rev

  Thanks for the report!

Farid.


copy ostringstream ostream_iterator output out of order

2008-03-25 Thread Mark Wright
Hello,

I compile and run following the program with stdcxx compiled from subversion
(svn update and compiled today) with Sun Studio 12 64 bit build mode 15D:

#include 
#include 
#include 
#include 
#include 

char char_array[] =
"Ptolemy, in the 2nd century AD, measured longitude eastward from a reference "
"meridian 2 degrees west of the Canary Islands. In 1493, Pope Alexander VI "
"established a line in the Atlantic west of the Azores to divide the "
"territories of Spain and Portugal. For many years, cartographers of these two "
"countries used this dividing line as the prime meridian. In 1570 the Dutch "
"cartographer Ortelius used the easternmost of the Cape Verde Islands. John "
"Davis, in his 1594 The Seaman's Secrets, used the Isle of Fez in the Canaries "
"because there the variation was zero.";

int main(int argc, char *argv[])
{
  std::string str(char_array);
  std::ostringstream m;
  std::copy(
str.begin(),
str.end(),
std::ostream_iterator(m));
  m << '\n';
  std::string result = m.str();
  std::cout << result;
  return 0;
}

With the Makefile:

ostr : ostr.o
CC -D_RWSTDDEBUG -mt -g -xdebugformat=stabs -xs -m64 -library=%none 
-I/h/goanna/1/a_5.10_m64/c/include -o ostr ostr.o 
-L/h/goanna/1/a_5.10_m64/c/lib  -R/h/goanna/1/a_5.10_m64/c/lib -lstd15D

ostr.o : ostr.cpp
CC -D_RWSTDDEBUG -mt -g -xdebugformat=stabs -xs -m64 -library=%none 
-I/h/goanna/1/a_5.10_m64/c/include -c ostr.cpp

clean:
rm ostr ostr.o

I am wondering if I am doing something wrong, as the output is
out of order:

goanna% gmake  
CC -D_RWSTDDEBUG -mt -g -xdebugformat=stabs -xs -m64 -library=%none 
-I/h/goanna/1/a_5.10_m64/c/include -c ostr.cpp
CC -D_RWSTDDEBUG -mt -g -xdebugformat=stabs -xs -m64 -library=%none 
-I/h/goanna/1/a_5.10_m64/c/include -o ostr ostr.o 
-L/h/goanna/1/a_5.10_m64/c/lib  -R/h/goanna/1/a_5.10_m64/c/lib -lstd15D
goanna% ./ostr 
the Canaries because there the variation was zero.
eastward from a reference meridian 2 degrees west of the Canary Islands. In 
1493, Pope Alexander VI established a line in the Atlantic west of the Azores 
to divide the territories of Spain and Portugal. For many years, cartographers 
of these two countries used this dividing line as the prime meridian. In 1570 
the Dutch cartographer Ortelius used the easternmost of the Cape Verde Islands. 
John Davigoanna% 

Thanks, Mark

--