mcap icon indicating copy to clipboard operation
mcap copied to clipboard

C++: types.inl make functions inline

Open filippobrizzi opened this issue 8 months ago • 6 comments

Changelog

Make functions defined in types.inl inline.

Description

This is needed to avoid linker multiple definition errors.

How to reproduce:

  • Create a library with two .cpp files
  • One file includes reader.hpp and one writer.hpp and both need to define MCAP_IMPLEMENTATION
  • File types.inl is included by both compilation units and when linker creates the libraries, the functions from types.inl are defined twice.

filippobrizzi avatar Jun 13 '24 08:06 filippobrizzi