Skip to content

Commit

Permalink
iox-#2057 Use deprecation macros and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 25, 2023
1 parent 9deba47 commit 9448165
Show file tree
Hide file tree
Showing 26 changed files with 68 additions and 49 deletions.
2 changes: 1 addition & 1 deletion iceoryx_hoofs/cmake/iceoryx_hoofs_deployment.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef IOX_HOOFS_ICEORYX_HOOFS_DEPLOYMENT_HPP
#define IOX_HOOFS_ICEORYX_HOOFS_DEPLOYMENT_HPP

#include "iceoryx_hoofs/iceoryx_hoofs_types.hpp"
#include "iox/iceoryx_hoofs_types.hpp"

namespace iox
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef IOX_HOOFS_POSIX_WRAPPER_UNIX_DOMAIN_SOCKET_HPP
#define IOX_HOOFS_POSIX_WRAPPER_UNIX_DOMAIN_SOCKET_HPP

#include "iceoryx_hoofs/cxx/filesystem.hpp"
#include "iceoryx_hoofs/internal/posix_wrapper/ipc_channel.hpp"
#include "iceoryx_platform/fcntl.hpp"
#include "iceoryx_platform/platform_settings.hpp"
Expand All @@ -27,6 +26,7 @@
#include "iceoryx_platform/un.hpp"
#include "iox/builder.hpp"
#include "iox/duration.hpp"
#include "iox/filesystem.hpp"
#include "iox/optional.hpp"

namespace iox
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
#define IOX_HOOFS_CXX_ALGORITHM_HPP

#include "iox/algorithm.hpp"
#pragma message( \
"Deprecated in 3.0, removed in 4.0, please include 'iox/algorithm.hpp' instead of 'iceoryx_hoofs/cxx/algorithm.hpp'")
#include "iox/detail/deprecation_marker.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/algorithm.hpp' instead.")

#endif // IOX_HOOFS_CXX_ALGORITHM_HPP
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/attributes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
#define IOX_HOOFS_CXX_ATTRIBUTES_HPP

#include "iox/attributes.hpp"
#include "iox/detail/deprecation_marker.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/attributes.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/attributes.hpp' instead")]]
namespace cxx
{
namespace internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
#define IOX_HOOFS_CXX_DEADLINE_TIMER_HPP

#include "iox/deadline_timer.hpp"
#include "iox/detail/deprecation_marker.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/deadline_timer.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/deadline_timer.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::deadline_timer' instead of 'iox::cxx::DeadlineTimer'
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/expected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_EXPECTED_HPP
#define IOX_HOOFS_CXX_EXPECTED_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/expected.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/expected.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/expected.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::error' instead of 'iox::cxx::error'
Expand Down
7 changes: 4 additions & 3 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
#ifndef IOX_HOOFS_CXX_FILESYSTEM_HPP
#define IOX_HOOFS_CXX_FILESYSTEM_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/filesystem.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/filesystem.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/filesystem.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::access_rights' instead of 'iox::cxx::perms'
using perms = iox::access_rights;
using perms IOX_DEPRECATED_SINCE(3, "Please use 'iox::access_rights' instead.") = iox::access_rights;
} // namespace cxx
} // namespace iox

Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_FUNCTION_HPP
#define IOX_HOOFS_FUNCTION_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/function.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/function.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/function.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::function' instead of 'iox::cxx::function'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_FUNCTION_REF_HPP
#define IOX_HOOFS_CXX_FUNCTION_REF_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/function_ref.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/function_ref.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/function_ref.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::function_ref' instead of 'iox::cxx::function_ref'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
#ifndef IOX_HOOFS_CXX_FUNCTIONAL_INTERFACE_HPP
#define IOX_HOOFS_CXX_FUNCTIONAL_INTERFACE_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/functional_interface.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/functional_interface.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/functional_interface.hpp' instead")]]
namespace cxx
{
namespace internal
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/newtype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
#ifndef IOX_HOOFS_CXX_NEWTYPE_HPP
#define IOX_HOOFS_CXX_NEWTYPE_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/newtype.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/newtype.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/newtype.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::NewType' instead of 'iox::cxx::NewType'
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_OPTIONAL_HPP
#define IOX_HOOFS_CXX_OPTIONAL_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/optional.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/optional.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/optional.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::in_place' instead of 'iox::cxx::in_place'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_SCOPE_GUARD_HPP
#define IOX_HOOFS_CXX_SCOPE_GUARD_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/scope_guard.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/scope_guard.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/scope_guard.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::ScopeGuard' instead of 'iox::cxx::ScopeGuard'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_SCOPED_STATIC_HPP
#define IOX_HOOFS_CXX_SCOPED_STATIC_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/scoped_static.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/scoped_static.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/scoped_static.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::makeScopedStatic' instead of 'iox::cxx::makeScopedStatic'
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/stack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
#ifndef IOX_HOOFS_CXX_STACK_HPP
#define IOX_HOOFS_CXX_STACK_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/stack.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/stack.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/stack.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::stack' instead of 'iox::cxx::stack'
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_STRING_HPP
#define IOX_HOOFS_CXX_STRING_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/string.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/string.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/string.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::concatenate' instead of 'iox::cxx::concatenate'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_TYPE_TRAITS_HPP
#define IOX_HOOFS_CXX_TYPE_TRAITS_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/type_traits.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/type_traits.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/type_traits.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::add_const_conditionally' instead of 'iox::cxx::add_const_conditionally'
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/unique_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_UNIQUE_PTR_HPP
#define IOX_HOOFS_CXX_UNIQUE_PTR_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/unique_ptr.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/unique_ptr.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/unique_ptr.hpp' instead")]]
namespace cxx
{
/// @deprecated
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
#ifndef IOX_HOOFS_CXX_VARIANT_HPP
#define IOX_HOOFS_CXX_VARIANT_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/variant.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/variant.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/variant.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::in_place_index' instead of 'iox::cxx::in_place_index'
Expand Down
5 changes: 3 additions & 2 deletions iceoryx_hoofs/legacy/include/iceoryx_hoofs/cxx/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
#ifndef IOX_HOOFS_CXX_VECTOR_HPP
#define IOX_HOOFS_CXX_VECTOR_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/vector.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/vector.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::vector' instead of 'iox::cxx::vector'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#define IOX_HOOFS_DESIGN_PATTERN_BUILDER_HPP

#include "iox/builder.hpp"
#pragma message( \
"Deprecated in 3.0, removed in 4.0, please include 'iox/builder.hpp' instead of 'iceoryx_hoofs/design_pattern/builder.hpp'")
#include "iox/detail/deprecation_marker.hpp"

#endif
IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/builder.hpp' instead.")

#endif // IOX_HOOFS_DESIGN_PATTERN_BUILDER_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
#ifndef IOX_HOOFS_ICEORYX_HOOFS_TYPES_HPP
#define IOX_HOOFS_ICEORYX_HOOFS_TYPES_HPP

#include "iox/detail/deprecation_marker.hpp"
#include "iox/iceoryx_hoofs_types.hpp"

IOX_DEPRECATED_HEADER_SINCE(3, "Please include 'iox/iceoryx_hoofs_types.hpp' instead.")

namespace iox
{
/// @todo iox-#1593 Deprecate include
/// [[deprecated("Deprecated in 3.0, removed in 4.0, please include 'iox/iceoryx_hoofs_types.hpp' instead")]]
namespace cxx
{
/// @deprecated use 'iox::byte' instead of 'iox::cxx::byte_t'
using byte_t = byte;
using byte_t IOX_DEPRECATED_SINCE(3, "Please use 'iox::byte' instead.") = byte;

} // namespace cxx
namespace log
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_hoofs/memory/include/iox/bump_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef IOX_HOOFS_MEMORY_BUMP_ALLOCATOR_HPP
#define IOX_HOOFS_MEMORY_BUMP_ALLOCATOR_HPP

#include "iceoryx_hoofs/cxx/expected.hpp"
#include "iox/expected.hpp"

#include <cstdint>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace
// NOLINTBEGIN(cppcoreguidelines-avoid-do-while) bad rule, disable globally
using namespace ::testing;
using namespace iox::er;
using namespace iox::cxx;
using namespace iox::testing;

using MyErrorA = module_a::errors::Error;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_hoofs/time/include/iox/detail/duration.inl
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ template <typename T>
inline constexpr T& operator*=(T&, const Duration&) noexcept
{
static_assert(
cxx::always_false_v<T>,
always_false_v<T>,
"Assigning the result of a Duration multiplication with 'operator*=' to an arithmetic type is not supported");
return T();
}
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_hoofs/time/include/iox/duration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#ifndef IOX_HOOFS_TIME_UNITS_DURATION_HPP
#define IOX_HOOFS_TIME_UNITS_DURATION_HPP

#include "iceoryx_hoofs/cxx/type_traits.hpp"
#include "iceoryx_platform/time.hpp" // required for QNX
#include "iox/expected.hpp"
#include "iox/log/logstream.hpp"
#include "iox/logging.hpp"
#include "iox/type_traits.hpp"

#include <cmath>

Expand Down

0 comments on commit 9448165

Please sign in to comment.