hackt icon indicating copy to clipboard operation
hackt copied to clipboard

feature request for compile time assert to print message

Open nbingham1 opened this issue 8 years ago • 1 comments

spec { assert<EXPR>() }

needs to be able to print a given message. Maybe like this?

spec { assert<EXPR, "print this message">() }

nbingham1 avatar Jul 01 '16 00:07 nbingham1

I'd propose something like this:

spec {
   assert<EXPR, STRING>()
}

Right now, it is:

spec {
  assert<EXPR, EXPR, EXPR, ...>()
}

and it checks that all expressions are true. I wonder if I can come up with a poor-man's workaround...

fangism avatar Jul 01 '16 00:07 fangism