C++, removing #include or #include in class header

后端 未结 12 1461
感情败类
感情败类 2021-01-03 06:37

I want to remove, if possible, the includes of both and from my class header file. Both string and vector are return types of functions declare

12条回答
  •  臣服心动
    2021-01-03 06:58

    Standard containers often have additional default template parameters (allocators, etc.) so this will not work. For example, here's a snippet from GNU implementation:

    
      template >
        class vector : protected _Vector_base<_Tp, _Alloc>
        { ... };
    

提交回复
热议问题