Forward declaration of std::wstring

前端 未结 5 1985
忘了有多久
忘了有多久 2021-02-05 08:00
// This is a header file.

class MyClass; // It can be forward declared because the function uses reference.
// However, how can I do forward declaraion about std::wstri         


        
5条回答
  •  天涯浪人
    2021-02-05 08:29

    std::wstring is a template instantiation, so you can't just forward declare it. You'll have to use the header file.

提交回复
热议问题