Analyse the code

//Line1
template <class T>
class mycontainer {
 //some code
};

// Line2
template <>
class mycontainer <char> {
 char element;
 public:
 mycontainer (char arg) {element=arg;}
 //some code
};

Analyse the code snippet given above and choose the correct inferences that can be made.

Options
  1. Line 2 defines the class template specialization
  2. Line1 defines the class template specialization
  3. Line 2 defines the generic class template
  4. Both L1 and L2 are part of the class template specialization

Related Posts

Close Bitnami banner
Bitnami