Changeset 2a301ff for libcfa/src/virtual_dtor.hfa
- Timestamp:
- Aug 31, 2023, 11:31:15 PM (2 years ago)
- Branches:
- master
- Children:
- 950c58e
- Parents:
- 92355883 (diff), 686912c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
libcfa/src/virtual_dtor.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/virtual_dtor.hfa
r92355883 r2a301ff 1 // inline this structure to have a virtual dtor. 1 #pragma once 2 3 // inline virtual_dtor to have a virtual dtor. 2 4 // when using this, delete() is also virtual and will be called on the right address 3 5 // using free() directly on polymorphic types may result in unaligned memory deallocation … … 8 10 // given struct A { inline virtual_dtor; } and struct B { inline virtual_dtor; } 9 11 // struct C { inline A; inline B; } will result in undefined behaviour 10 11 12 struct virtual_dtor { 12 13 void (*__virtual_dtor_ptr)(virtual_dtor &);
Note:
See TracChangeset
for help on using the changeset viewer.