开发者

forward declaration in c++

I want to forward 开发者_如何学JAVAdeclare:

namespace boost {
    namespace property_tree {
        template<typename Key, typename Data, typename KeyCompare = std::less<Key> >
        class basic_ptree;
        typedef basic_ptree< std::string, std::string > ptree;
    }
}

but my g++ cribs about redefinition due to default template argument. How can I achieve this?


To forward-declare the property_tree, you should include the

#include <boost/property_tree/ptree_fwd.hpp>

header, instead of declaring one yourself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜