Opened 13 years ago

Closed 13 years ago

#3072 closed Bugs (fixed)

[program options] regression test failures in VC10 Beta 1

Reported by: Richard Webb <richard.webb@…> Owned by: Vladimir Prus
Milestone: Boost 1.40.0 Component: program_options
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:

Description

The Program options regression tests are all failing in VC10 beta 1.

e.g.

http://tinyurl.com/prf59j

http://tinyurl.com/qfxz8y

There are actually 3 failures:

1) Some calls to bind are ambiguous (might be either boost::bind or std::tr1::bind). These can be fixed by explicitly calling boost::bind.

2) Theres an error about back_inserter not being defined from detail/parsers.hpp. Adding an #include <iterator> fixes the error.

3) There is also a failure due to the issue described at https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=457199 . The issue occurs when trying to instantiate 'variables_map' from variables_map.hpp

The attached patch fixes te first 2 issue, but i don't know if anything can be done about the third.

Attachments (1)

program_options.diff (2.6 KB ) - added by Richard Webb <richard.webb@…> 13 years ago.

Download all attachments as: .zip

Change History (6)

by Richard Webb <richard.webb@…>, 13 years ago

Attachment: program_options.diff added

comment:1 by Richard Webb <richard.webb@…>, 13 years ago

The third issue mentioned above has been fixed by MS - i guess the fix will be in VC10 beta 2.

comment:2 by Vladimir Prus, 13 years ago

Can you explain why (1) is happening?

comment:3 by Vladimir Prus, 13 years ago

(In [53623]) Include missing #include of 'iterator'.

Addresses #3072.

comment:4 by Richard Webb <richard.webb@…>, 13 years ago

The compiler output says that std::tr1::bind is being found by ADL (which i assume is because the calls have std::string and/or std::vector as arguments).

VC10 actually declares bind in the tr1 namespace and then puts it into the std namespace with a 'using tr1::bind', so i guess that it's finding the one in std:: and then listing it as std::tr1:: in the error message.

comment:5 by Vladimir Prus, 13 years ago

Resolution: fixed
Status: newclosed

(In [53700]) Explicitly-qualify the use of boost::bind.

It appears that MSVC 10 puts tr1's bind into std namespace, which clases with boost::bind thanks to ADL. Closes #3072. Patch from Richard Webb.

Note: See TracTickets for help on using tickets.