Opened 14 years ago

Last modified 6 years ago

#231 reopened Bugs

Graph Header Clashes With Format Header

Reported by: schmoo2k Owned by: jsiek
Milestone: Component: graph
Version: None Severity: Problem
Keywords: Cc:

Description (last modified by Jeremiah Willcock)

The following code produces many errors in MSVC71

#include <boost/format.hpp> 
#include <boost/graph/adjacency_list.hpp>

int _tmain(int argc, _TCHAR* argv[])
	std::string s = (boost::format("%1% %2% %
3%") % "a" % "b" % "c").str();
	return 0;

Attachments (0)

Change History (9)

comment:1 Changed 14 years ago by samuel_k

Logged In: YES 

Is this about the 1.31.0 released libraries, or CVS head ?

CVS head's boost::format fails compilation on msvc7.1 on its
own at the moment.

comment:2 Changed 14 years ago by nobody

Logged In: NO 

This refers to the 1_31_0 release.
If you remove the graph header above all is ok...

comment:3 Changed 14 years ago by jsiek

Logged In: YES 

I don't have access to msvc7.1, but if somone can provide a
I'll be happy to apply it.

comment:4 Changed 14 years ago by monecke

Logged In: YES 

I have the same problem with 1.31.0 ans also msvc7.1 

comment:5 Changed 13 years ago by Douglas Gregor

Status: assignedclosed

comment:6 Changed 13 years ago by nobody

Logged In: NO 

I saw that <boost/graph/adjacency_list.hpp> defines a put
function in namespace boost.

format.hpp defines, and uses, a template function with same
name in 

Could that be the couse of problem ? MSVC7.1 has trouble
with namespaces ?

btw error logs could help.

comment:7 Changed 6 years ago by johnw@…

Resolution: Fixed
Severity: Problem
Status: closedreopened

This collision of Boost.Graph's put() and Boost.Format's put() is still occurring in 1.49.0.

comment:8 Changed 6 years ago by anonymous

One thing to note is that I only the collision when using g++-4.7, not with Clang 3.0 or 3.1.

comment:9 Changed 6 years ago by Jeremiah Willcock

Description: modified (diff)

I tested that code (with _tmain changed to main and _TCHAR to char) and it worked just fine for me on GCC 4.7.0 on Linux. Do you have a different test program that shows the problem?

Modify Ticket

Change Properties
Set your email in Preferences
as reopened The owner will remain jsiek.

Add Comment

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

Note: See TracTickets for help on using tickets.