mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-18 19:05:40 +02:00
Fix ambiguity in stringification
Happening when using clang and templated operators, clang cannot decide between the operator provided by ReusableStringStream and the one provided by the value value as both are templates. This is easily solved by calling the operator<< through the member syntax. Fixes #1285
This commit is contained in:

committed by
Martin Hořeňovský

parent
021fcee636
commit
7be8a41adf
@@ -8407,6 +8407,20 @@ with expansion:
|
||||
==
|
||||
"operator<<( has_operator )"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
stringify( has_template_operator )
|
||||
-------------------------------------------------------------------------------
|
||||
ToStringWhich.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ToStringWhich.tests.cpp:<line number>:
|
||||
PASSED:
|
||||
REQUIRE( ::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )" )
|
||||
with expansion:
|
||||
"operator<<( has_template_operator )"
|
||||
==
|
||||
"operator<<( has_template_operator )"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
stringify( vectors<has_maker> )
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -8978,6 +8992,6 @@ Misc.tests.cpp:<line number>:
|
||||
PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 207 | 141 passed | 62 failed | 4 failed as expected
|
||||
assertions: 1078 | 936 passed | 121 failed | 21 failed as expected
|
||||
test cases: 208 | 142 passed | 62 failed | 4 failed as expected
|
||||
assertions: 1079 | 937 passed | 121 failed | 21 failed as expected
|
||||
|
||||
|
Reference in New Issue
Block a user