在boost中“header”和“Conven header”之间有什么区别?
答案 0 :(得分:14)
便捷标题通常(不仅仅是在Boost中)包含许多其他标题(包含实际代码)的标题,这些标题通常一起使用,即使它们之间没有硬依赖关系(这就是为什么它们'首先要分开。)
答案 1 :(得分:7)
它包含许多不同但相关的标题
例如boost / smart_ptr.hpp包括共享和范围指针容器:
//
// smart_ptr.hpp
//
// For convenience, this header includes the rest of the smart
// pointer library headers.
//
// Copyright (c) 2003 Peter Dimov Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// http://www.boost.org/libs/smart_ptr/smart_ptr.htm
//
#include <boost/config.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES)
# include <boost/weak_ptr.hpp>
# include <boost/intrusive_ptr.hpp>
# include <boost/enable_shared_from_this.hpp>
#endif