opened
janEbert
username_0
Some types are not supported for extraction.

[`BuiltinType`](https://github.com/username_1/ros_type_introspection/blob/5b71ac2aa3c06e0d83da21313b0544a80012e8ec/include/ros_type_introspection/builtin_types.hpp) is missing two [`getType()`](https://github.com/username_1/ros_type_introspection/blob/5b71ac2aa3c06e0d83da21313b0544a80012e8ec/include/ros_type_introspection/builtin_types.hpp#L111-L134) functions, namely for `BYTE` and `CHAR` which currently resolve to `OTHER` (as they are not overloaded like the other types) which prevents the correct type comparison in [`Variant::extract()`](https://github.com/username_1/ros_type_introspection/blob/master/include/ros_type_introspection/utils/variant.hpp#L176).

This PR adds those overloads. However, some stuff might be debatable:
- I overloaded `BYTE` using `unsigned char`. Another possibility is using the C++17 [`std::byte`](https://en.cppreference.com/w/cpp/types/byte) class which is not as backwards compatible but semantically nicer.
- `CHAR` is overloaded using `char`. This makes semantic sense but has one quirk: `char` can be a `signed char` or `unsigned char` (the same type as `BYTE`, although distinct in the sense that it does not break the template).
  I cannot think of when it could be problematic but there may be cases.
Add missing BuiltinType::getType() overloads
issue
created
facontidavide
username_1
Thank you, I don't know how I missed them ;)
comment
created
facontidavide
username_1
Why you did this to me? :(
How could you?

http://build.ros.org/job/Ldev__ros_type_introspection__ubuntu_xenial_amd64/41/changes
comment
created
janEbert
username_0
Oh man, I am so sorry! :(
I wrote this from a Windows machine on which I could not build.

Because it was so simple, I would not have imagined it would break the build.
What could be the reason?
comment
created
janEbert
username_0
Ah I see, the types point to the same stuff.
comment
created
facontidavide
username_1
No problem, I was kidding, I will fix it later.

Cheers
comment
created
janEbert
username_0
Thanks, that's a bit reassuring, but, I still trashed your master... :)
Because I feel very bad, I did remove all occurrences of `BYTE` in [this](3917ad6c3e7070ce221dfd40bf194382698aae28) commit.
Although I understand if you cannot trust me anymore. ☺️
comment