Conversation
|
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
| }; | ||
|
|
||
| #if __cplusplus >= 202002L | ||
| static_assert(Lattice<Bool>); |
There was a problem hiding this comment.
What does this do? Check it can instantiate the concept perhaps? (I just made that up as my best guess, I have no idea how concepts work... 😄 )
There was a problem hiding this comment.
Concepts are named collections of type constraints, so this checks that the Bool type satisfies the Lattice constraints.
There was a problem hiding this comment.
I see, thanks. So this is the same as Lattice<Bool> _unused; basically, but without declaring a variable, and just asserting in debug builds?
There was a problem hiding this comment.
Unfortunately you cannot write Lattice<Bool> _unused because concepts are not types, they're just predicates on types. Since this is a static_assert, it is evaluated at compile time for all C++20 builds, not just debug builds.
This is a lattice with two elements: `false` is bottom and `true` is top. Add a new gtest file for testing lattices.
This is a lattice with two elements: `false` is bottom and `true` is top. Add a new gtest file for testing lattices.

This is a lattice with two elements:
falseis bottom andtrueis top.Add a new gtest file for testing lattices.