Modify

Opened 4 years ago

Closed 4 years ago

#7999 closed Bugs (fixed)

Multiple compilation errors due to circular header inclusion dependency

Reported by: francisco.mailing.lists@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost Development Trunk Severity: Problem
Keywords: Cc: francisco.mailing.lists@…

Description

In file included from libs/math/build/../src/tr1/assoc_laguerre.cpp:10:

In file included from ./boost/math/tr1.hpp:383:

In file included from ./boost/math/tools/promotion.hpp:26:

In file included from ./boost/math/tools/config.hpp:25:

./boost/math/special_functions/detail/round_fwd.hpp:24:13: error: use of undeclared identifier 'tools'

typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol);


promotion includes config, config includes round_fwd, round_fwd includes promotion.

config.h seems to not need to include round_fwd.h, since from what I've checked, what it used from round_fwd.h is inside a definition of a macro (BOOST_MATH_STD_USING), hence no compile time dependency.

Attachments (0)

Change History (4)

comment:1 Changed 4 years ago by anonymous

Well, just removing the include from config.h wont solve either (as expected).

comment:2 Changed 4 years ago by francisco.mailing.lists@…

I've not thought it throughout, the include guards should prevent this, I'm using clang... not sure where the problem may lie anymore.

comment:3 Changed 4 years ago by francisco.mailing.lists@…

oh yeah, promotion.h includes config.h on on top, config.h includes round_fwd.hpp, round_fwd.hpp includes promotion.h, which includes nothing because of the guards of the first inclusion, and them goes on using declaration from promotion.h which is still not expanded.

comment:4 Changed 4 years ago by John Maddock

Resolution: fixed
Status: newclosed

(In [82921]) Fix cyclic dependency. Fixes #7999.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.