Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nice error messages for unsupported && and || #1480

Merged
merged 1 commit into from
Jan 1, 2019
Merged

Add nice error messages for unsupported && and || #1480

merged 1 commit into from
Jan 1, 2019

Conversation

BiCapitalization
Copy link
Contributor

Description

As explained in issue #1273, operator&& and operator|| should give
a proper compile time error on use instead of the compiler complaining
about them not being defined. This PR adds an always_false type in
catch_meta.hpp used for implementing a nice static_assert for both
of the abovementioned operators.

GitHub Issues

Closes #1273

@codecov
Copy link

codecov bot commented Jan 1, 2019

Codecov Report

Merging #1480 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1480   +/-   ##
=======================================
  Coverage   80.39%   80.39%           
=======================================
  Files         121      121           
  Lines        3426     3426           
=======================================
  Hits         2754     2754           
  Misses        672      672

1 similar comment
@codecov
Copy link

codecov bot commented Jan 1, 2019

Codecov Report

Merging #1480 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1480   +/-   ##
=======================================
  Coverage   80.39%   80.39%           
=======================================
  Files         121      121           
  Lines        3426     3426           
=======================================
  Hits         2754     2754           
  Misses        672      672

As explained in issue #1273, `operator&&` and `operator||` should give
a proper compile time error on use instead of the compiler complaining
about them not being defined. This commit adds an `always_false` type in
`catch_meta.hpp` used for implementing a nice `static_assert` for both
of the abovementioned operators.

Closes #1273
@horenmar horenmar merged commit b3facee into catchorg:master Jan 1, 2019
@horenmar
Copy link
Member

horenmar commented Jan 1, 2019

Thanks

@horenmar horenmar added the Tweak label Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants