Std::istreambuf_iterator-Gleichheit bei Verwendung von searchgC++

Programme in C++. Entwicklerforum
Guest
 Std::istreambuf_iterator-Gleichheit bei Verwendung von searchg

Post by Guest »

Ich bin verwirrt über die Ausgabe des folgenden Codes:

Code: Select all

std::string content = "abcdefghijklmnopqrstuvwxyz1234567890";

std::istringstream iss(content);
iss.seekg(10);
std::istreambuf_iterator it{iss}, end;
EXPECT_TRUE(iss.good());

iss.seekg(35);
std::istreambuf_iterator it2{iss};
EXPECT_TRUE(iss.good());

iss.seekg(0);
std::istreambuf_iterator it3{iss};
EXPECT_TRUE(iss.good());

bool oneAndTwo = it == it2;
bool twoAndThree = it2 == it3;
std::cout

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post