New gcc uses C++14 mode, this fixes implicit conversion (#3392)

* New gcc uses C++14 mode, this fixes implicit conversion

The issue is described in depth [here][desc].  C++14 no longer
allows implicit conversion from iostream classes to void*.

This patch comes directly from [PR #6][patch].

[desc]: http://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar
[patch]: https://github.com/agordon/libgtextutils/pull/6

* mend
This commit is contained in:
George Hartzell 2017-03-09 15:27:56 -08:00 committed by Adam J. Stewart
parent ebd5066d07
commit 611df0bebf
2 changed files with 11 additions and 0 deletions

View File

@ -31,4 +31,5 @@ class Libgtextutils(AutotoolsPackage):
homepage = "https://github.com/agordon/libgtextutils"
url = "https://github.com/agordon/libgtextutils/releases/download/0.7/libgtextutils-0.7.tar.gz"
patch('text_line_reader.patch')
version('0.7', '593c7c62e3c76ec49f5736eed4f96806')

View File

@ -0,0 +1,10 @@
--- libgtextutils/src/gtextutils/text_line_reader.cpp.orig 2017-03-09 07:49:56.358283887 -0800
+++ libgtextutils/src/gtextutils/text_line_reader.cpp 2017-03-09 07:50:24.317503887 -0800
@@ -44,6 +44,6 @@
if (input_stream.eof())
return false;
- return input_stream ;
+ return static_cast<bool>(input_stream) ;
}