# Partial specialization ___ ## Template function partial specialization In C++ we cannot partially specialize functions. ___ ## Template class partial specialization In C++ we can specialize classes partially. It means that we need to leave at least one template parameter. ```cpp // primary template template class A {}; // partial specialization with T1 = int template class A {}; // partial specialization with T1 = int and T2 = double template class A {}; // partial specialization with T1 = int and T3 = char template class A {}; // full specialization with T1 = T2 = double and T3 = int template <> class A {}; ``` ___ ## Advanced partial specialization ```cpp template class A {}; // primary template template class A {}; // #1: partial specialization where T2 is a pointer to T1 template class A {}; // #2: partial specialization where T1 is a pointer template class A {}; // #3: partial specialization where T1 is int, I is double, // and T2 is a pointer template class A {}; // #4: partial specialization where T2 is a pointer ``` ___ ## Exercise Write a partial specialization of `VectorMap` for boolean keys. We can have only 2 values for boolean keys. There is no need to keep vectors inside. Implement properly all currently available functions.