Project

General

Profile

Actions

Bug #2723

closed

IndentedStream duplicates output when stream is flushed multiple times

Added by Alex Afanasyev over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Utils
Target version:
Start date:
04/02/2015
Due date:
% Done:

100%

Estimated time:

Description

The following snippet reproduces the problem:

std::ostringstream os;

os << "Hello" << std::endl;  
{
  IndentedStream os1(os, " [prefix] ");
  os1 << "," << std::endl;
  {
    IndentedStream os2(os1, " [another prefix] ");
    os2 << "World!" << std::endl;
  }
}

std::cout << os.str() << std::endl;

Expected output:

Hello
 [prefix] ,
 [prefix]  [another prefix] World!

Actual:

Hello
 [prefix] ,
 [prefix] ,
 [prefix]  [another prefix] World!
 [prefix]  [another prefix] World!

Related issues 1 (0 open1 closed)

Blocks ndns - Task #2250: ndns-list-zone: Change output format for ID-CERTsClosedJiewen Tan11/30/2014

Actions
Actions #1

Updated by Alex Afanasyev over 9 years ago

  • Blocks Task #2250: ndns-list-zone: Change output format for ID-CERTs added
Actions #2

Updated by Alex Afanasyev over 9 years ago

  • Status changed from In Progress to Code review
Actions #3

Updated by Alex Afanasyev over 9 years ago

  • Status changed from Code review to Closed

Applied in changeset commit:ndn-cpp-dev|17ef37d0e67fa40b169390176100b7139da70309.

Actions

Also available in: Atom PDF