title: C++17 class template argument deduction not working in initializer list, why?
body: <p>i am playing around with class template argument deduction. There is no problem creating an object of Class A in the main function, but when i try to create object of Class A in another class the deduction fails. Why?</p>
  <pre><code>template&lt;class T&gt;
  class A {
  public:
      A(T value) : myValue(value) {}
   
      T myValue;
  };
  
  class B {
  public:
      B(int value) : a(value) {}
  
      A a;    // this IS NOT working, why??
  };
  
  int main() {
      A a(100); // this IS working
      B b(100);
  }
  </code></pre>