File: fixing_implicit_conversion.patch

package info (click to toggle)
libgtextutils 0.7-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 388 kB
  • sloc: cpp: 946; ansic: 418; makefile: 84
file content (19 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Suppressing overload issue due to references on rvalues
 C++11 introduced references on rvalues, and thus the two implicit conversion
 operators to std::string caused ambiguous conversions, for instance in
 tests/test_text_reader/cpp.
Author: Pierre Gruet <pgt@debian.org>
Bug: https://bugs.debian.org/925745
Forwarded: https://github.com/agordon/libgtextutils/issues/15
Last-Update: 2020-07-28

--- a/src/gtextutils/text_line_reader.h
+++ b/src/gtextutils/text_line_reader.h
@@ -54,7 +54,6 @@
 
 	//implicit conversions
 	operator const std::string& () const { return line_string() ; }
-	operator std::string() const { return line_string(); }
 	operator std::istream& () { return line_stream(); }
 
 };