Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing rtti destructor to non-virtual #140

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading