Просмотр исходного кода

Fix exotic ci env that lacks ostringstream::str (#11581)

Olivier Chafik 11 месяцев назад
Родитель
Сommit
69804487e0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      common/minja.hpp

+ 1 - 1
common/minja.hpp

@@ -824,7 +824,7 @@ public:
     LoopControlType control_type;
     LoopControlType control_type;
     LoopControlException(const std::string & message, LoopControlType control_type) : std::runtime_error(message), control_type(control_type) {}
     LoopControlException(const std::string & message, LoopControlType control_type) : std::runtime_error(message), control_type(control_type) {}
     LoopControlException(LoopControlType control_type)
     LoopControlException(LoopControlType control_type)
-      : std::runtime_error((std::ostringstream() << (control_type == LoopControlType::Continue ? "continue" : "break") << " outside of a loop").str()),
+      : std::runtime_error((control_type == LoopControlType::Continue ? "continue" : "break") + std::string(" outside of a loop")),
         control_type(control_type) {}
         control_type(control_type) {}
 };
 };