TorstenRobitzki / bluetoe

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

catch wrong arguments #2

Closed TorstenRobitzki closed 6 years ago

TorstenRobitzki commented 9 years ago

Passing an argument that is meant to be a parameter for a template should be caught as error when passing to an other template. For example when passing an appearance::mouse server option to a service, this should yield an error.

TorstenRobitzki commented 7 years ago
using server = bluetoe::server<
    bluetoe::characteristic<
        bluetoe::bind_characteristic_value< const std::uint8_t, &value_1 >,
        bluetoe::notify
    >,
    bluetoe::characteristic<
        bluetoe::bind_characteristic_value< const std::uint8_t, &value_2 >,
        bluetoe::notify
    >
>;

This compiles without error and should not, as a characteristic should not be a server option, but a service option.

TorstenRobitzki commented 6 years ago

Done for arguments / options / parameters to characteristic<>.

TorstenRobitzki commented 6 years ago

options to server<>, service<> and characteristic<> are checked now.