Advertisement
Ilya_konstantinov

harakiri.h

Sep 16th, 2024 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | Source Code | 0 0
  1. #include <utility>
  2. #include <memory>
  3. #include <string>
  4. #include <type_traits>
  5.  
  6. class OneTimeCallback {
  7. protected:
  8.     std::unique_ptr<std::string> s_;
  9.  
  10. public:
  11.     OneTimeCallback(const char *);
  12.  
  13.     OneTimeCallback(std::string);
  14.  
  15.     virtual ~OneTimeCallback();
  16.  
  17.     virtual const std::string operator()() const &&;
  18. };
  19.  
  20. class AwesomeCallback : public OneTimeCallback {
  21. public:
  22.     AwesomeCallback(std::string s);
  23.     AwesomeCallback(const char *s);
  24.     ~AwesomeCallback();
  25.  
  26.     const std::string operator()() const &&;
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement