templated typedef?

前端 未结 4 1502
我寻月下人不归
我寻月下人不归 2020-12-04 19:10

I\'m using libgc, a garbage collector for C and C++. To make STL containers garbage collectible one must use the gc_allocator.

Instead of writing

s         


        
4条回答
  •  甜味超标
    2020-12-04 20:06

    You can use C++11 templated type aliasing using using e.g. like this

    template 
    using gc_vector = std::vector>;
    

    Note: I know this is an old question but since it has quite many upvotes and as it turns up in search results I thought it deserved an updated answer.

提交回复
热议问题