Clean-up: tests: bt2 plug-ins: modernize the plug-ins
[lttng-tools.git] / src / common / container-wrapper.hpp
index 7f9678d08d3cb8252de645bd3731434d73b4e52a..20642a8d294213a5a914bd6d3a0cbedcb2c4767c 100644 (file)
@@ -117,6 +117,11 @@ public:
                return ContainerOperations::size(_container);
        }
 
+       bool empty() const
+       {
+               return size() == 0;
+       }
+
        typename std::conditional<std::is_pointer<ElementType>::value, ElementType, ElementType&>::type
        operator[](std::size_t index)
        {
@@ -144,7 +149,7 @@ public:
        operator[](std::size_t index) const
        {
                if (index >= ContainerOperations::size(_container)) {
-                       LTTNG_THROW_INVALID_ARGUMENT_ERROR(lttng::format(
+                       throw std::invalid_argument(lttng::format(
                                "Out of bound access through random_access_container_wrapper: index={}, size={}",
                                index,
                                size()));
This page took 0.024198 seconds and 4 git commands to generate.