format.hpp 663 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef AI_BOOST_FORMAT_DUMMY_INCLUDED
  2. #define AI_BOOST_FORMAT_DUMMY_INCLUDED
  3. #ifndef BOOST_FORMAT_HPP
  4. #include <string>
  5. namespace boost
  6. {
  7. class str;
  8. class format
  9. {
  10. friend class str;
  11. public:
  12. format (const std::string& _d)
  13. : d(_d)
  14. {
  15. }
  16. template <typename T>
  17. const format& operator % (T in) const
  18. {
  19. return *this;
  20. }
  21. private:
  22. std::string d;
  23. };
  24. class str : public std::string
  25. {
  26. public:
  27. str(const format& f)
  28. {
  29. *((std::string* const)this) = std::string( f.d );
  30. }
  31. };
  32. }
  33. #else
  34. # error "format.h was already included"
  35. #endif //
  36. #endif // !! AI_BOOST_FORMAT_DUMMY_INCLUDED