cgreen icon indicating copy to clipboard operation
cgreen copied to clipboard

Custom constraints can't be implemented without access to `make_cgreen_<type>_value()`

Open thoni56 opened this issue 4 years ago • 1 comments

The feature of being able to create custom constraints (see https://cgreen-devs.github.io/#_custom_constraints) is very handy.

However the example, and use, requires the inclusion of cgreen_value_internal.h which is not available in a packaged installation, so you need to have the source available.

One way to fix this is to move cgreen_value_internal.h to include/cgreen/internal/cgreen_value_internal.h. This way it would be available in packaged installations, but also clearly signal that using this is subject to some risk.

thoni56 avatar Jun 17 '21 06:06 thoni56

The example also shouldn't` indicate that you should (or even can) access Cgreen's internal functions...

thoni56 avatar Jun 17 '21 07:06 thoni56