
Aleksey, I've just been trying the new version of mpl on Digital Mars. The attached patch fixes the bug that sometimes causes mpl::if_ to fail. The problem is that the class template gets redeclared with different parameter names by bind.hpp, and this confuses the compiler. When it instantiates the class, it uses the wrong names. The fix is just to make sure bind.hpp is included before mpl::if_ is defined. thanks, Daniel

Daniel James <daniel@calamity.org.uk> writes:
Aleksey,
I've just been trying the new version of mpl on Digital Mars. The attached patch fixes the bug that sometimes causes mpl::if_ to fail. The problem is that the class template gets redeclared with different parameter names by bind.hpp, and this confuses the compiler.
That can be a problem for some older versions of Codewarrior as well. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

David Abrahams writes:
Daniel James <daniel@calamity.org.uk> writes:
Aleksey,
I've just been trying the new version of mpl on Digital Mars. The attached patch fixes the bug that sometimes causes mpl::if_ to fail. The problem is that the class template gets redeclared with different parameter names by bind.hpp, and this confuses the compiler.
That can be a problem for some older versions of Codewarrior as well.
Which we don't care about, right? -- Aleksey Gurtovoy MetaCommunications Engineering

"Aleksey Gurtovoy" <agurtovoy@meta-comm.com> writes:
David Abrahams writes:
Daniel James <daniel@calamity.org.uk> writes:
Aleksey,
I've just been trying the new version of mpl on Digital Mars. The attached patch fixes the bug that sometimes causes mpl::if_ to fail. The problem is that the class template gets redeclared with different parameter names by bind.hpp, and this confuses the compiler.
That can be a problem for some older versions of Codewarrior as well.
Which we don't care about, right?
I don't know. It might have been an 8.x version; I don't remember exactly. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

David Abrahams writes:
"Aleksey Gurtovoy" <agurtovoy@meta-comm.com> writes:
David Abrahams writes:
Daniel James <daniel@calamity.org.uk> writes:
Aleksey,
I've just been trying the new version of mpl on Digital Mars. The attached patch fixes the bug that sometimes causes mpl::if_ to fail. The problem is that the class template gets redeclared with different parameter names by bind.hpp, and this confuses the compiler.
That can be a problem for some older versions of Codewarrior as well.
Which we don't care about, right?
I don't know. It might have been an 8.x version; I don't remember exactly.
I workarounded this particular bug so it doesn't matter either way. Just wanted to make sure that 7.2 is not of any interest, because it's not being tested with. -- Aleksey Gurtovoy MetaCommunications Engineering

Daniel James writes:
I've just been trying the new version of mpl on Digital Mars. The attached patch fixes the bug that sometimes causes mpl::if_ to fail. The problem is that the class template gets redeclared with different parameter names by bind.hpp, and this confuses the compiler. When it instantiates the class, it uses the wrong names. The fix is just to make sure bind.hpp is included before mpl::if_ is defined.
Hmm, that will work only if neither bind nor its dependencies include "if.hpp". They don't right now, but I wouldn't rely on it. I think I'd prefer just to fix the names in the header to match the ones used by the bind specialization -- those are considerably less likely to change. OK, fixed. Thanks for the report! -- Aleksey Gurtovoy MetaCommunications Engineering
participants (3)
-
Aleksey Gurtovoy
-
Daniel James
-
David Abrahams