interprocess icon indicating copy to clipboard operation
interprocess copied to clipboard

Disabling runtime type identification feature cause an error during compilation

Open cngzhnp opened this issue 3 years ago • 0 comments

Boost Version : 1.78 GCC Version : 11.2.0

When we try to compile Boost::Interprocess component with disabling RTTI (via -fno-rtti option with GCC) cause a compilation error due to standard typeid implementation.

Here is the simple build command and result with -fno-rtti option:

g++ -Wall -fno-rtti detail/in_place_interface.hpp -I ../../ -o wout_rtti

detail/in_place_interface.hpp:19:11: warning: #pragma once in main file
   19 | #  pragma once
      |           ^~~~
detail/in_place_interface.hpp: In constructor ‘boost::interprocess::ipcdetail::placement_destroy<T>::placement_destroy()’:
detail/in_place_interface.hpp:56:15: error: cannot use ‘typeid’ with ‘-fno-rtti’
   56 |       typeid(T).name())
      |               ^

cngzhnp avatar Dec 31 '21 13:12 cngzhnp