diff --git a/iceoryx_hoofs/test/moduletests/test_vocabulary_expected.cpp b/iceoryx_hoofs/test/moduletests/test_vocabulary_expected.cpp index dee0408b5d..4e86f29551 100644 --- a/iceoryx_hoofs/test/moduletests/test_vocabulary_expected.cpp +++ b/iceoryx_hoofs/test/moduletests/test_vocabulary_expected.cpp @@ -546,7 +546,7 @@ TEST_F(expected_test, ExpectedWithValueConvertsToOptionalWithValue) ::testing::Test::RecordProperty("TEST_ID", "a877f9bd-5793-437f-8dee-a109aed9f647"); constexpr int VALUE = 4711; expected sut{success(VALUE)}; - iox::optional value = sut.to_optional(); + optional value = sut.to_optional(); ASSERT_THAT(value.has_value(), Eq(true)); EXPECT_THAT(*value, Eq(VALUE)); @@ -556,7 +556,7 @@ TEST_F(expected_test, ExpectedWithErrorConvertsToOptionalWithoutValue) { ::testing::Test::RecordProperty("TEST_ID", "fe161275-8fa2-43c9-86e7-0a20d79eb44f"); expected sut{error(TestError::ERROR1)}; - iox::optional value = sut.to_optional(); + optional value = sut.to_optional(); ASSERT_THAT(value.has_value(), Eq(false)); } diff --git a/iceoryx_hoofs/vocabulary/include/iox/detail/expected.inl b/iceoryx_hoofs/vocabulary/include/iox/detail/expected.inl index 1838edc07c..46368e810e 100644 --- a/iceoryx_hoofs/vocabulary/include/iox/detail/expected.inl +++ b/iceoryx_hoofs/vocabulary/include/iox/detail/expected.inl @@ -23,18 +23,6 @@ namespace iox { // AXIVION Next Construct AutosarC++19_03-A12.1.5 : This is a false positive since there is no fitting constructor // available for delegation -namespace internal -{ -template -struct IsOptional : std::false_type -{ -}; -template -struct IsOptional> : std::true_type -{ -}; -} // namespace internal - template inline success::success(const T& t) noexcept : value(t) diff --git a/iceoryx_hoofs/vocabulary/include/iox/expected.hpp b/iceoryx_hoofs/vocabulary/include/iox/expected.hpp index e855b92410..970c146a72 100644 --- a/iceoryx_hoofs/vocabulary/include/iox/expected.hpp +++ b/iceoryx_hoofs/vocabulary/include/iox/expected.hpp @@ -27,13 +27,6 @@ namespace iox { -namespace internal -{ -/// @brief Type trait which verifies whether the passed type T is of type optional -template -struct IsOptional; -} // namespace internal - /// @brief helper struct to create an expected which is signalling success more easily /// @param T type which the success helper class should contain /// @code diff --git a/iceoryx_posh/include/iceoryx_posh/capro/service_description.hpp b/iceoryx_posh/include/iceoryx_posh/capro/service_description.hpp index 90190963fe..72dd9167c1 100644 --- a/iceoryx_posh/include/iceoryx_posh/capro/service_description.hpp +++ b/iceoryx_posh/include/iceoryx_posh/capro/service_description.hpp @@ -22,6 +22,7 @@ #include "iceoryx_hoofs/log/logstream.hpp" #include "iceoryx_posh/iceoryx_posh_types.hpp" #include "iox/expected.hpp" +#include "iox/optional.hpp" #include "iox/string.hpp" #include