scoped_ptr_example.hpp
来自「boost库提供标准的C++ API 配合dev c++使用,功能更加强大」· HPP 代码 · 共 28 行
HPP
28 行
// Boost scoped_ptr_example header file ------------------------------------//
// Copyright Beman Dawes 2001.
// See accompanying license for terms and conditions of use.
// See http://www.boost.org/libs/smart_ptr for documentation.
#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>
// The point of this example is to prove that even though
// example::implementation is an incomplete type in translation units using
// this header, scoped_ptr< implementation > is still valid because the type
// is complete where it counts - in the inplementation translation unit where
// destruction is actually instantiated.
class example : private boost::noncopyable
{
public:
example();
~example();
void do_something();
private:
class implementation;
boost::scoped_ptr< implementation > _imp; // hide implementation details
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?