title: Is it possible to introspect on methods using Boost Hana?
body: <p><a href="http://boostorg.github.io/hana/" rel="nofollow"><strong>Boost Hana</strong></a> provides the ability to introspect on class member fields in a simple and beautiful way:</p>
  
  <pre><code>// define:
  
  struct Person {
    std::string name;
    int age;
  };
  
  // below could be done inline, but I prefer not polluting the 
  // declaration of the struct
  BOOST_HANA_ADAPT_STRUCT(not_my_namespace::Person, name, age);
  
  // then:
  
  Person john{"John", 30};
  hana::for_each(john, [](auto pair) {
    std::cout &lt;&lt; hana::to&lt;char const*&gt;(hana::first(pair)) &lt;&lt; ": "
              &lt;&lt; hana::second(pair) &lt;&lt; std::endl;
  });
  </code></pre>
  
  <p>However, the documentation only mentions member <em>fields</em>. I would like to introspect on methods also. I've tried to naively extend the example with a method:</p>
  
  <pre><code>struct Foo {
      std::string get_name() const { return "louis"; }
  };
  
  BOOST_HANA_ADAPT_STRUCT(::Foo, get_name);
  </code></pre>
  
  <p>This compiles. However, as soon as I try to use it, using code similar to the above (<code>for_each</code>...), I get many compile errors. Since there are no examples that show introspection of methods, I'm wondering whether it is supported.</p>