Skip to content

Commit

Permalink
Resolved #359
Browse files Browse the repository at this point in the history
Eclipse header indexer did not handle the operator->* correctly. So
rename the function from operator->* to eval can resolve the Eclipse
false alert.
  • Loading branch information
kentsangkm committed Mar 21, 2015
1 parent b9ec8a1 commit c97927f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/internal/catch_capture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
try { \
( __catchResult->*expr ).endExpression(); \
__catchResult.eval(expr).endExpression(); \
} \
catch( ... ) { \
__catchResult.useActiveException( Catch::ResultDisposition::Normal ); \
Expand Down
8 changes: 4 additions & 4 deletions include/internal/catch_result_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ namespace Catch {
ResultDisposition::Flags resultDisposition );

template<typename T>
ExpressionLhs<T const&> operator->* ( T const& operand );
ExpressionLhs<bool> operator->* ( bool value );
ExpressionLhs<T const&> eval( T const& operand );
ExpressionLhs<bool> eval( bool value );

template<typename T>
ResultBuilder& operator << ( T const& value ) {
Expand Down Expand Up @@ -93,11 +93,11 @@ namespace Catch {
namespace Catch {

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

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

Expand Down
10 changes: 5 additions & 5 deletions single_include/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ namespace Catch {
ResultDisposition::Flags resultDisposition );

template<typename T>
ExpressionLhs<T const&> operator->* ( T const& operand );
ExpressionLhs<bool> operator->* ( bool value );
ExpressionLhs<T const&> eval( T const& operand );
ExpressionLhs<bool> eval( bool value );

template<typename T>
ResultBuilder& operator << ( T const& value ) {
Expand Down Expand Up @@ -1301,11 +1301,11 @@ class ExpressionLhs {
namespace Catch {

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

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

Expand Down Expand Up @@ -1475,7 +1475,7 @@ namespace Catch {
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \
try { \
( __catchResult->*expr ).endExpression(); \
__catchResult.eval(expr).endExpression(); \
} \
catch( ... ) { \
__catchResult.useActiveException( Catch::ResultDisposition::Normal ); \
Expand Down

0 comments on commit c97927f

Please sign in to comment.