[C++-sig] call policies help needed

Neal Becker ndbecker2 at gmail.com
Thu May 25 03:50:07 CEST 2006

Is there something wrong with this, which looks simpler to my (naive) eyes?:

struct A {};

struct B {
  B (A& _a) : a (_a) {}
  A& a;

static A& getA (B& b) {
  return b.a;

  class_<A> ("A");
  class_<B> ("B", init<A&>()
    .def ("getA", &::getA, return_internal_reference<>())

More information about the Cplusplus-sig mailing list