I am applying example 6 of boost multi_index examples. https://www.boost.org/doc/libs/1_71_0/libs/multi_index/doc/examples.html#example6
I am still learning the syntax of key extraction.i find that member
key extractor require for its third argument a pointer to class
member of type type
where class is first arg and type is second arg .
template<class Class,typename Type,Type Class::*PtrToMember>
struct member;
But in example 6 the author uses 3rd arg which is not pointer .....
key_from_key<
member<car_manufacturer,
const std::string,
&car_manufacturer::name>,
member<car_model,
const car_manufacturer *,
car_model::manufacturer> >
this should be &
to make pointer which points to the member of class car_model
of type const car_manufacturer *
so giving us pointer to pointer
.....but he just use the member identifiercar_model::manufacturer
which is only pointer to member.
So why did the author omits the &
from third argument??
if any more code required i will put it.