#include <boost/iterator/transform_iterator.hpp>
#include <boost/bind.hpp>
#include <vector>
#include <algorithm>
#include <iostream>
struct S
{
int i;
char *s;
float f;
};
int main()
{
S a[] = {{10, NULL, 2.1},
{11, NULL, 0.1},
{12, NULL, 1.1}};
std::vector<S> v(a, a+3);
std::cout << *std::min_element(
boost::make_transform_iterator(v.begin(), boost::bind(&S::f, _1)),
boost::make_transform_iterator(v.end(), boost::bind(&S::f, _1))
) << '\n';
}
I2luY2x1ZGUgPGJvb3N0L2l0ZXJhdG9yL3RyYW5zZm9ybV9pdGVyYXRvci5ocHA+CiNpbmNsdWRlIDxib29zdC9iaW5kLmhwcD4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgpzdHJ1Y3QgUwp7CiAgICBpbnQgaTsKICAgIGNoYXIgKnM7CiAgICBmbG9hdCBmOwp9OwoKaW50IG1haW4oKQp7CiAgICBTIGFbXSA9IHt7MTAsIE5VTEwsIDIuMX0sCiAgICAgICAgICAgICB7MTEsIE5VTEwsIDAuMX0sCiAgICAgICAgICAgICB7MTIsIE5VTEwsIDEuMX19OwogICAgc3RkOjp2ZWN0b3I8Uz4gdihhLCBhKzMpOwogICAgc3RkOjpjb3V0IDw8ICpzdGQ6Om1pbl9lbGVtZW50KAogICAgICAgICAgICAgICAgICAgIGJvb3N0OjptYWtlX3RyYW5zZm9ybV9pdGVyYXRvcih2LmJlZ2luKCksIGJvb3N0OjpiaW5kKCZTOjpmLCBfMSkpLAogICAgICAgICAgICAgICAgICAgIGJvb3N0OjptYWtlX3RyYW5zZm9ybV9pdGVyYXRvcih2LmVuZCgpLCBib29zdDo6YmluZCgmUzo6ZiwgXzEpKQogICAgICAgICAgICAgICAgICApIDw8ICdcbic7Cn0K