C++ One std::vector containing template class of multiple types

前端 未结 5 954
太阳男子
太阳男子 2021-01-31 02:03

I need to store multiple types of a template class in a single vector.

Eg, for:

template 
class templateClass{
     bool someFunction()         


        
5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-31 02:40

    If you're looking at a container to store multiple types, then you should explore boost variant from the popular boost library.

提交回复
热议问题