mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-15 18:05:38 +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
@@ -9366,6 +9366,19 @@ loose text artifact
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="stringify( has_template_operator )" tags="[toString]" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Original>
|
||||
::Catch::Detail::stringify( item ) == "operator<<( has_template_operator )"
|
||||
</Original>
|
||||
<Expanded>
|
||||
"operator<<( has_template_operator )"
|
||||
==
|
||||
"operator<<( has_template_operator )"
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="stringify( vectors<has_maker> )" tags="[toString]" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/UsageTests/ToStringWhich.tests.cpp" >
|
||||
<Original>
|
||||
@@ -9923,7 +9936,7 @@ loose text artifact
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="936" failures="122" expectedFailures="21"/>
|
||||
<OverallResults successes="937" failures="122" expectedFailures="21"/>
|
||||
</Group>
|
||||
<OverallResults successes="936" failures="121" expectedFailures="21"/>
|
||||
<OverallResults successes="937" failures="121" expectedFailures="21"/>
|
||||
</Catch>
|
||||
|
Reference in New Issue
Block a user