cpp-common: add `bt2s::optional`, alias of `nonstd::optional`
[babeltrace.git] / src / cpp-common / bt2 / message-iterator.hpp
index 9ba7ed96319a9ec3ab2e0597ebe73f6589c3655e..9f3084b1fdf29a25b8e5717b319710c279f89f3d 100644 (file)
@@ -10,7 +10,7 @@
 #include <babeltrace2/babeltrace.h>
 
 #include "common/common.h"
-#include "cpp-common/optional.hpp"
+#include "cpp-common/bt2s/optional.hpp"
 
 #include "component-port.hpp"
 #include "exc.hpp"
@@ -50,7 +50,7 @@ public:
         return ConstComponent {bt_message_iterator_borrow_component(this->libObjPtr())};
     }
 
-    nonstd::optional<ConstMessageArray> next() const
+    bt2s::optional<ConstMessageArray> next() const
     {
         bt_message_array_const libMsgsPtr;
         std::uint64_t count;
@@ -61,7 +61,7 @@ public:
             /* Caller becomes the owner of the contained messages */
             return ConstMessageArray::wrapExisting(libMsgsPtr, count);
         case BT_MESSAGE_ITERATOR_NEXT_STATUS_END:
-            return nonstd::nullopt;
+            return bt2s::nullopt;
         case BT_MESSAGE_ITERATOR_NEXT_STATUS_AGAIN:
             throw TryAgain {};
         case BT_MESSAGE_ITERATOR_NEXT_STATUS_MEMORY_ERROR:
This page took 0.02279 seconds and 4 git commands to generate.