Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2005-12-11 01:56:49


Bugs item #1378025, was opened at 2005-12-10 22:56
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1378025&group_id=7586

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: dsmtoday (dsmtoday)
Assigned to: Nobody/Anonymous (nobody)
Summary: multi_index/detail/unbounded.hpp causes problems in MSVC PCH

Initial Comment:
MSVC 7.1

I integrated a multi_index into my project and have
been very happy with it. However, compile times for my
class went from milliseconds to five seconds. And
since this class is a cornerstone of my project, this
time got added to each compile.

To try and speed things up, I put this particular
class's header file in my precompiled header system.
Well, that worked great, everything compiles fast, but
when it links, there are two static objects defined in
every object file, causing conflicts, so it doesn't
link. The errors are the same this guy got.
http://lists.boost.org/boost-users/2004/07/7151.php

What I tried and what works for me, but I'm not sure is
an acceptable long-term solution, was to #define out
two lines which to my eyes appear to define static
objects. Why this is only a problem for pre-compiled
headers, I don't know. Anyway, here is what I did to
unbounded.hpp

#if !defined(_MSC_VER)
namespace{

detail::unbounded_type
unbounded_obj=detail::unbounded_type();
detail::unbounded_type& unbounded=unbounded_obj;

} /* unnamed */
#endif

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1378025&group_id=7586

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk