title: Initialization of std::array with function pointer member function of constexpr object
body: <p>I am trying to initialize an std::array of function pointers. These pointers point to member functions of an already instantiated object.</p>
  
  <p>Can somebody please help with the following example? Many thanks in advance!</p>
  
  <pre><code>#include &lt;array&gt;
  
  using TVoidVoid = void (*)(void);
  
  class Foo {
  public:
    constexpr Foo() {}
    void myHandler() {}
  };
  
  class Bar {
  public:
    constexpr Bar() : handler_{nullptr} {}
    constexpr Bar(TVoidVoid handler) : handler_{handler} {}
  
  private:
    TVoidVoid handler_;
  };
  
  Foo f;
  std::array&lt;Bar, 5&gt; bar_array = {{Bar{}, Bar{f.myHandler}}};
  
  int main() {}
  </code></pre>
  
  <p>compiling produces:</p>
  
  <pre><code>main.cpp:22:56: error: no matching function for call to ‘Bar::Bar(&lt;brace-enclosed initializer list&gt;)’
  std::array&lt;Bar, 5&gt; bar_array = {{Bar{}, Bar{f.myHandler}}};
  </code></pre>
  
  <p>I am using <code>g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0</code>.</p>