void-packages/srcpkgs/commoncpp2/patches/ftbfs.patch
q66 97a0e12536 commoncpp2: fix with gcc9
The headers are still public, so revbump, as anything using them
would also fail.
2019-12-17 21:10:41 +01:00

23 lines
866 B
Diff

C++ does not allow specifying default arguments on friend declarations.
We can simply do this as getline is not otherwise publicly declared.
--- inc/cc++/string.h
+++ inc/cc++/string.h
@@ -731,7 +731,7 @@ public:
* @param delim deliminator to use.
* @param size optional size limitor.
*/
- friend __EXPORT std::istream &getline(std::istream &is, String &str, char delim = '\n', size_t size = 0);
+ friend __EXPORT std::istream &getline(std::istream &is, String &str, char delim, size_t size);
/**
* Stream the content of our string variable directly to a C++
@@ -743,7 +743,7 @@ public:
* Stream input into our variable.
*/
inline friend std::istream &operator>>(std::istream &is, String &str)
- {return getline(is, str);};
+ {return getline(is, str, '\n', 0);};
#ifdef HAVE_SNPRINTF
/**