TorstenRobitzki / bluetoe

C++ Framework to build Bluetooth LE Server (GATT)
MIT License
142 stars 29 forks source link

applying `server_name<>` as a service argument #41

Closed TorstenRobitzki closed 3 years ago

TorstenRobitzki commented 5 years ago

applying server_name<> as a service argument does not yield a compilation error. Instead, the option in not applied and silently ignored.

If this option is given as an option to a service, this has to result in a compilation error.

TorstenRobitzki commented 3 years ago

The reason for the bug is, that the compiler seems to skip the evaluation of the const expression static constexpr auto options_test = sizeof(... that should result in the evaluation of the size of an incomplete type.

Comparing the sizeof expression with 0 in a static_assert seems to fix this issue.