mirror of
https://github.com/boostorg/regex.git
synced 2025-07-30 20:47:21 +02:00
Added patch for gcc 2.95 and get_line under cygwin
[SVN r18535]
This commit is contained in:
@ -87,6 +87,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace boost{
|
||||||
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550)) || defined(__SGI_STL_PORT)
|
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550)) || defined(__SGI_STL_PORT)
|
||||||
//
|
//
|
||||||
// problem with std::getline under MSVC6sp3
|
// problem with std::getline under MSVC6sp3
|
||||||
@ -102,8 +103,7 @@ istream& getline(istream& is, std::string& s)
|
|||||||
}
|
}
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
#endif
|
#elif defined(__CYGWIN__)
|
||||||
#if defined(__GNUC__) && (__GNUC__ == 3)
|
|
||||||
istream& getline(istream& is, std::string& s)
|
istream& getline(istream& is, std::string& s)
|
||||||
{
|
{
|
||||||
std::getline(is, s);
|
std::getline(is, s);
|
||||||
@ -111,7 +111,10 @@ istream& getline(istream& is, std::string& s)
|
|||||||
s.erase(s.size() - 1);
|
s.erase(s.size() - 1);
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
using std::getline;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char**argv)
|
int main(int argc, char**argv)
|
||||||
@ -151,7 +154,7 @@ int main(int argc, char**argv)
|
|||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
cout << "Enter expression (or \"quit\" to exit): ";
|
cout << "Enter expression (or \"quit\" to exit): ";
|
||||||
getline(cin, s1);
|
boost::getline(cin, s1);
|
||||||
if(argc == 2)
|
if(argc == 2)
|
||||||
cout << endl << s1 << endl;
|
cout << endl << s1 << endl;
|
||||||
if(s1 == "quit")
|
if(s1 == "quit")
|
||||||
@ -185,7 +188,7 @@ int main(int argc, char**argv)
|
|||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
cout << "Enter string to search (or \"quit\" to exit): ";
|
cout << "Enter string to search (or \"quit\" to exit): ";
|
||||||
getline(cin, s2);
|
boost::getline(cin, s2);
|
||||||
if(argc == 2)
|
if(argc == 2)
|
||||||
cout << endl << s2 << endl;
|
cout << endl << s2 << endl;
|
||||||
if(s2 == "quit")
|
if(s2 == "quit")
|
||||||
@ -374,3 +377,4 @@ int main(int argc, char**argv)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user