cpp-common: add `bt2s::optional`, alias of `nonstd::optional`
[babeltrace.git] / src / cpp-common / bt2 / value.hpp
index 54d33bcc5c3e0ba2991cf0f01d4a0f1f7064f6e3..19919ed205fbfd0c06c85fea3015ce2416b529ae 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "common/assert.h"
 #include "common/common.h"
-#include "cpp-common/optional.hpp"
+#include "cpp-common/bt2s/optional.hpp"
 
 #include "borrowed-object-iterator.hpp"
 #include "borrowed-object.hpp"
@@ -241,7 +241,7 @@ public:
     }
 
     template <typename KeyT>
-    nonstd::optional<CommonValue<LibObjT>> operator[](KeyT&& key) const noexcept
+    bt2s::optional<CommonValue<LibObjT>> operator[](KeyT&& key) const noexcept
     {
         return this->asMap()[std::forward<KeyT>(key)];
     }
@@ -1285,19 +1285,19 @@ public:
         return this->length() == 0;
     }
 
-    nonstd::optional<CommonValue<LibObjT>> operator[](const char * const key) const noexcept
+    bt2s::optional<CommonValue<LibObjT>> operator[](const char * const key) const noexcept
     {
         const auto libObjPtr =
             internal::CommonMapValueSpec<LibObjT>::entryByKey(this->libObjPtr(), key);
 
         if (!libObjPtr) {
-            return nonstd::nullopt;
+            return bt2s::nullopt;
         }
 
         return CommonValue<LibObjT> {libObjPtr};
     }
 
-    nonstd::optional<CommonValue<LibObjT>> operator[](const std::string& key) const noexcept
+    bt2s::optional<CommonValue<LibObjT>> operator[](const std::string& key) const noexcept
     {
         return (*this)[key.data()];
     }
This page took 0.025026 seconds and 4 git commands to generate.