boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
101 stars 113 forks source link

Function definition in header file #82

Closed jbouny closed 6 years ago

jbouny commented 6 years ago

Hello,

With the last fix/refactoring commit on adaptive pool (04b0791593a2a87e8a4fb906b1d5cc65ffc2610d), I have an "already defined symbol" issue when building our software with boost 1.68.

Indeed, when including boost/container/adaptive_pool.hpp, it includes boost/container/detail/adaptive_node_pool.hpp which itself includes boost/container/detail/adaptive_node_pool_impl.hpp.

The issue in in this last file, where we are declaring AND defining the function boost::container::dtl::candidate_power_of_2_rt(). This triggers a nice linker error.

igaztanaga commented 6 years ago

Many thanks for the report, fixed in commit:

https://github.com/boostorg/container/commit/d4ff624264cf157bae67e9161fadd247759be79d