How to explicitly instantiate a template for all members of MPL vector in C++?

后端 未结 6 578
日久生厌
日久生厌 2021-02-01 05:53

Consider the following header file:

// Foo.h
class Foo {
    public: 
        template 
        void read(T& value);
};

I

6条回答
  •  不知归路
    2021-02-01 06:31

    explicit instantiation has special grammar and special meaning to complier, so cannot be done with meta programming.

    your solution cause a instantiation, but not a explicit instantiation.

提交回复
热议问题