Skip to content

Commit c97927f

Browse files
author
kentsangkm
committed
Resolved #359
Eclipse header indexer did not handle the operator->* correctly. So rename the function from operator->* to eval can resolve the Eclipse false alert.
1 parent b9ec8a1 commit c97927f

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

include/internal/catch_capture.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
do { \
3434
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
3535
try { \
36-
( __catchResult->*expr ).endExpression(); \
36+
__catchResult.eval(expr).endExpression(); \
3737
} \
3838
catch( ... ) { \
3939
__catchResult.useActiveException( Catch::ResultDisposition::Normal ); \

include/internal/catch_result_builder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ namespace Catch {
4141
ResultDisposition::Flags resultDisposition );
4242

4343
template<typename T>
44-
ExpressionLhs<T const&> operator->* ( T const& operand );
45-
ExpressionLhs<bool> operator->* ( bool value );
44+
ExpressionLhs<T const&> eval( T const& operand );
45+
ExpressionLhs<bool> eval( bool value );
4646

4747
template<typename T>
4848
ResultBuilder& operator << ( T const& value ) {
@@ -93,11 +93,11 @@ namespace Catch {
9393
namespace Catch {
9494

9595
template<typename T>
96-
inline ExpressionLhs<T const&> ResultBuilder::operator->* ( T const& operand ) {
96+
inline ExpressionLhs<T const&> ResultBuilder::eval( T const& operand ) {
9797
return ExpressionLhs<T const&>( *this, operand );
9898
}
9999

100-
inline ExpressionLhs<bool> ResultBuilder::operator->* ( bool value ) {
100+
inline ExpressionLhs<bool> ResultBuilder::eval( bool value ) {
101101
return ExpressionLhs<bool>( *this, value );
102102
}
103103

single_include/catch.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,8 @@ namespace Catch {
724724
ResultDisposition::Flags resultDisposition );
725725

726726
template<typename T>
727-
ExpressionLhs<T const&> operator->* ( T const& operand );
728-
ExpressionLhs<bool> operator->* ( bool value );
727+
ExpressionLhs<T const&> eval( T const& operand );
728+
ExpressionLhs<bool> eval( bool value );
729729

730730
template<typename T>
731731
ResultBuilder& operator << ( T const& value ) {
@@ -1301,11 +1301,11 @@ class ExpressionLhs {
13011301
namespace Catch {
13021302

13031303
template<typename T>
1304-
inline ExpressionLhs<T const&> ResultBuilder::operator->* ( T const& operand ) {
1304+
inline ExpressionLhs<T const&> ResultBuilder::eval( T const& operand ) {
13051305
return ExpressionLhs<T const&>( *this, operand );
13061306
}
13071307

1308-
inline ExpressionLhs<bool> ResultBuilder::operator->* ( bool value ) {
1308+
inline ExpressionLhs<bool> ResultBuilder::eval( bool value ) {
13091309
return ExpressionLhs<bool>( *this, value );
13101310
}
13111311

@@ -1475,7 +1475,7 @@ namespace Catch {
14751475
do { \
14761476
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
14771477
try { \
1478-
( __catchResult->*expr ).endExpression(); \
1478+
__catchResult.eval(expr).endExpression(); \
14791479
} \
14801480
catch( ... ) { \
14811481
__catchResult.useActiveException( Catch::ResultDisposition::Normal ); \

0 commit comments

Comments
 (0)