Skip to content

Commit

Permalink
Changing rtti destructor to non-virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
thirtytwobits committed Oct 16, 2024
1 parent 3271390 commit d15b180
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
"insertable",
"Kirienko",
"mainpage",
"NOLINT",
"NOLINTBEGIN",
"NOLINTEND",
"NOLINTNEXTLINE",
"NOTFOUND",
"opencyphal",
"Pavel",
Expand Down
8 changes: 7 additions & 1 deletion cetlvast/suites/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,15 @@ get_property(LOCAL_EXAMPLES DIRECTORY "examples" PROPERTY IN_BUILD_TESTS)

list(TRANSFORM LOCAL_EXAMPLES PREPEND "examples/")

if (NOT DEFINED CETL_PROJECT_VERSION)
set(LOCAL_OPEN_CYPHAL_PROJECT_VERSION "0.0.0")
else()
set(LOCAL_OPEN_CYPHAL_PROJECT_VERSION ${CETL_PROJECT_VERSION})
endif()

create_docs_target( DOCS_DOXY_ROOT ${CMAKE_CURRENT_SOURCE_DIR}
OPEN_CYPHAL_PROJECT_NAME "CETL"
OPEN_CYPHAL_PROJECT_VERSION ${CETL_PROJECT_VERSION}
OPEN_CYPHAL_PROJECT_VERSION ${LOCAL_OPEN_CYPHAL_PROJECT_VERSION}
OPEN_CYPHAL_PROJECT_NAME_BRIEF
"Cyphal Embedded Template Library"
EXAMPLES_PATH
Expand Down
9 changes: 3 additions & 6 deletions include/cetl/rtti.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,7 @@ class rtti
/// @}

protected:
rtti() = default;
rtti(const rtti&) = default;
rtti(rtti&&) = default;
virtual ~rtti() noexcept = default;
rtti& operator=(const rtti&) = default;
rtti& operator=(rtti&&) = default;
~rtti() noexcept = default;
};

/// Non-polymorphic types that want to support RTTI should simply provide a \c _get_type_id_()
Expand Down Expand Up @@ -290,6 +285,8 @@ struct rtti_helper : public virtual cetl::rtti, public Bases...
}
/// @}

virtual ~rtti_helper() noexcept = default;

private:
// Exhaustively search for a matching conversion throughout the entire type hierarchy tree.
// Template parameter pack expansion is not available in C++14 so we do it the hard way.
Expand Down

0 comments on commit d15b180

Please sign in to comment.