Opened 12 years ago

Closed 12 years ago

#5135 closed Bugs (fixed)

Syntax error, if boost/thread.hpp is included before boost/icl/...

Reported by: afojgo@… Owned by: Joachim Faulhaber
Milestone: Boost 1.46.0 Component: ICL
Version: Boost Release Branch Severity: Problem
Keywords: syntax error, macro unexpected include dependency Cc:

Description

If <boost/thread.hpp> is included before code that uses the BOOST_STATIC_CONSTANT Macro inside certain templates, it influences compilation: Code that has compiled well, produces a syntax error C2059 under msvc-9/10. This can be fixed by enclosing certain subexpressions in parentheses. The problem does not occur for gcc compilers.

Although the bug can be fixed inserting paretheses into code from Boost.Icl it would be much better to fix the cause of the bug inside code included in <boost/thread.hpp>.

Attachments (1)

fix_include_after_thread.cpp (1.6 KB ) - added by Joachim Faulhaber <afojgo@…> 12 years ago.
Minimal code to reproduce the error

Download all attachments as: .zip

Change History (3)

by Joachim Faulhaber <afojgo@…>, 12 years ago

Minimal code to reproduce the error

comment:1 by Joachim Faulhaber, 12 years ago

The bug has been fixed on the trunk. 2 Tests are added:

  1. Test "fix_include_after_thread" provides a minimal example of the bug and its fix.
  2. Test "fix_icl_after_thread" checks if the bug is fixed for icl production code.

The fix can now be merged into the release branch as soon as permission is given by the release managers.

comment:2 by Joachim Faulhaber, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.