Advertisement
Guest User

Untitled

a guest
Nov 1st, 2012
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. //.h файл
  2. class Foo{
  3. private:
  4.     unique_ptr<FooImp> impl;
  5. public:
  6.     void DoSomethig();
  7. };
  8. //И .cpp файл, в котором лежит
  9. struct FooImpl{
  10.     void ReallyDoSomethig(){doSomething;}
  11. };
  12. void Foo::DoSomething(){
  13.     impl->ReallyDoSomethig();
  14. }
  15. Foo::Foo() : impl(make_unique<FooImpl>()){ }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement