title: class member unique pointer with custom deleter outside initializer list
body: <pre><code>class foo {
      foo();
      unique_ptr&lt;T, (void *)(T*)&gt; ptr;
  };
  
  foo::foo() {
      bool x = some operation;
      if (!x) throw;
      ptr = unique_ptr&lt;T, (void *)(T*)&gt;(new T(x), deleter);
  }
  </code></pre>
  
  <p>This code does not compile because the unique pointer and its deleter get initialized with null (as I don't initialize it in the initializer list). I can't initialize it in the list because it's dependent on the variable <code>x</code> as shown above. How can I solve this deadlock?</p>