I now want everything mimicking the STL stuff to have the same names,
but I don't want to mix coding styles in `bt2c`.
Therefore introduce this new `bt2s` (the `s` stands for `std`) namespace
to contain everything acting as the STL (or Boost, if need be).
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ie24c11170cc650028f3ce50fcab2004f0195c12f
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11393
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
cpp-common/bt2c/glib-up.hpp \
cpp-common/bt2c/lib-str.hpp \
cpp-common/bt2c/libc-up.hpp \
cpp-common/bt2c/glib-up.hpp \
cpp-common/bt2c/lib-str.hpp \
cpp-common/bt2c/libc-up.hpp \
- cpp-common/bt2c/make-unique.hpp \
cpp-common/bt2c/read-fixed-len-int.hpp \
cpp-common/bt2c/safe-ops.hpp \
cpp-common/bt2c/std-int.hpp \
cpp-common/bt2c/uuid-view.hpp \
cpp-common/bt2c/uuid.hpp \
cpp-common/bt2c/vector.hpp \
cpp-common/bt2c/read-fixed-len-int.hpp \
cpp-common/bt2c/safe-ops.hpp \
cpp-common/bt2c/std-int.hpp \
cpp-common/bt2c/uuid-view.hpp \
cpp-common/bt2c/uuid.hpp \
cpp-common/bt2c/vector.hpp \
+ cpp-common/bt2s/make-unique.hpp \
cpp-common/nlohmann/json.hpp \
cpp-common/optional.hpp \
cpp-common/string_view.hpp
cpp-common/nlohmann/json.hpp \
cpp-common/optional.hpp \
cpp-common/string_view.hpp
+++ /dev/null
-/*
- * Copyright (c) 2022 Philippe Proulx <pproulx@efficios.com>
- *
- * SPDX-License-Identifier: MIT
- */
-
-#ifndef BABELTRACE_CPP_COMMON_BT2C_MAKE_UNIQUE_HPP
-#define BABELTRACE_CPP_COMMON_BT2C_MAKE_UNIQUE_HPP
-
-#include <memory>
-#include <type_traits>
-#include <utility>
-
-namespace bt2c {
-
-/*
- * Our implementation of std::make_unique<>() for C++11.
- */
-template <typename T, typename... ArgTs>
-std::unique_ptr<T> makeUnique(ArgTs&&...args)
-{
- static_assert(!std::is_array<T>::value, "`T` is not an array (unsupported).");
-
- return std::unique_ptr<T>(new T {std::forward<ArgTs>(args)...});
-}
-
-} /* namespace bt2c */
-
-#endif /* BABELTRACE_CPP_COMMON_BT2C_MAKE_UNIQUE_HPP */
--- /dev/null
+/*
+ * Copyright (c) 2022 Philippe Proulx <pproulx@efficios.com>
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#ifndef BABELTRACE_CPP_COMMON_BT2S_MAKE_UNIQUE_HPP
+#define BABELTRACE_CPP_COMMON_BT2S_MAKE_UNIQUE_HPP
+
+#include <memory>
+#include <type_traits>
+#include <utility>
+
+namespace bt2s {
+
+/*
+ * Our implementation of std::make_unique<>() for C++11.
+ */
+template <typename T, typename... ArgTs>
+std::unique_ptr<T> make_unique(ArgTs&&...args)
+{
+ static_assert(!std::is_array<T>::value, "`T` is not an array (unsupported).");
+
+ return std::unique_ptr<T>(new T {std::forward<ArgTs>(args)...});
+}
+
+} /* namespace bt2s */
+
+#endif /* BABELTRACE_CPP_COMMON_BT2S_MAKE_UNIQUE_HPP */