Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Colors can be created #69

Open
Tracked by #68
TheoPannetier opened this issue Feb 14, 2024 · 1 comment
Open
Tracked by #68

Colors can be created #69

TheoPannetier opened this issue Feb 14, 2024 · 1 comment

Comments

@TheoPannetier
Copy link
Contributor

No description provided.

@richelbilderbeek richelbilderbeek self-assigned this Feb 21, 2024
richelbilderbeek pushed a commit that referenced this issue Feb 21, 2024
richelbilderbeek pushed a commit that referenced this issue Feb 21, 2024
richelbilderbeek pushed a commit that referenced this issue Feb 21, 2024
@richelbilderbeek
Copy link
Member

richelbilderbeek commented Feb 21, 2024

Use branch issue_69.

There, make these tests come true:

void test_color()
{
    // #69: colors can be created
    {
      const color red = color::red;
      const color black = color::black;
      const color white = color::white;
      static_assert(red != black, "red is not black");
      static_assert(red != white, "red is not white");
    }
}

A static_assert is similar to an assert, except that the test happens during compiling (whatever that is :-) )

@richelbilderbeek richelbilderbeek removed their assignment Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants