PointCloudLibrary/pcl — pull request #462 by taketwo (2014-01-22 09:50:58+00:00)
Title: Add a family of "has field" meta-functions

As suggested in #440, this pull request adds a family of "_has field_" functions to check presence of a particular field in a point type both at compile- and run-time.

The functions are put inside `pcl::traits` namespace. Logically, they should belong to 'pcl_traits.h' file, however due to inclusion loop I had to move them to 'point_types.h'.

The functions added are:

* `has_field`
* `has_all_fields`
* `has_any_field`

for querying any kind/combination of fields, and:

* `has_xyz`
* `has_normal`
* `has_curvature`
* `has_color`
* `has_label`

to check presence of most commonly used fields.

This pull request also adds a unit test for the new functions.