Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

34 linhas
572 B

  1. #pragma once
  2. #include <sstream>
  3. namespace cppcore
  4. {
  5. struct string_builder
  6. {
  7. private:
  8. std::ostringstream os;
  9. public:
  10. /**
  11. * @brief Write something to the string builder
  12. */
  13. template<typename TArg>
  14. string_builder& operator<<(TArg&& arg);
  15. /**
  16. * @brief Get the constructed string.
  17. */
  18. inline std::string str() const;
  19. /**
  20. * @brief Get the constructed string.
  21. */
  22. inline operator std::string() const;
  23. };
  24. }
  25. #include "string_builder.inl"