Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

25 строки
460 B

  1. // cotire example project
  2. #include "example.h"
  3. #ifndef NDEBUG
  4. #include <algorithm>
  5. #include <iterator>
  6. #endif
  7. namespace example {
  8. std::string get_message() {
  9. char msg_chrs[] = { 'C', 'o', 't', 'i', 'r', 'e', 'd', '!' };
  10. #ifdef NDEBUG
  11. return std::string(&msg_chrs[0], &msg_chrs[sizeof(msg_chrs)]);
  12. #else
  13. std::string msg;
  14. msg.reserve(sizeof(msg_chrs));
  15. std::copy(msg_chrs, msg_chrs + sizeof(msg_chrs), std::back_inserter(msg));
  16. return msg;
  17. #endif
  18. }
  19. }