format.hpp 751 B

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