mongodb/libbson — pull request #14 by schoentoon (2013-11-28 20:55:46+00:00)
Title: Fixed a small issue that disallowed include the headers in C++

I got this error when including the bson.h header in a C++ program:

/usr/local/include/libbson-1.0/bson-iter.h:445:11: error: cannot initialize return object of type 'bson_type_t' with an lvalue of type 'const bson_uint8_t'
(aka 'const unsigned char')
return iter->type[0];
^~~~~~~~~~~~~
1 error generated.

Typecasting it to a bson_type_t in the bson-iter.h header fixes this.