Changeset a1f0cb6 for libcfa


Ignore:
Timestamp:
Jun 27, 2023, 4:46:17 PM (11 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
508671e
Parents:
14e1053
Message:

added pragma once

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/virtual_dtor.hfa

    r14e1053 ra1f0cb6  
    1 // inline this structure to have a virtual dtor.
     1#pragma once
     2
     3// inline virtual_dtor to have a virtual dtor.
    24// when using this, delete() is also virtual and will be called on the right address
    35// using free() directly on polymorphic types may result in unaligned memory deallocation
     
    810//     given struct A { inline virtual_dtor; } and struct B { inline virtual_dtor; }
    911//     struct C { inline A; inline B; } will result in undefined behaviour
    10 
    1112struct virtual_dtor {
    1213    void (*__virtual_dtor_ptr)(virtual_dtor &);
Note: See TracChangeset for help on using the changeset viewer.