Skip to content

Add custom WRAP compiler directive

Todd requested to merge todoooo/vtk:Development into master

The __VTK_WRAP__ conditional define in VTK 8.1 introduces hard-coded C++11 style attributes which are otherwise blank. A small change to the definitions permits a dependent application/library to specify its own attributes. This is necessary for the Clang compiler, which otherwise just ignores the attributes; vtk::newinstance, vtk::zerocopy, vtk::expects(x), vtk::sizehint(__VA_ARGS__)

In particular I would like to be able to do something like

#define VTK_SIZEHINT(...) __attribute(annotate(sizehint(__VA_ARGS__))

by including another header file into the build process.

Closes #17304 (closed)

Edited by Todd

Merge request reports

Loading