Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#3106 closed Bugs (fixed)

wave on VS2010 beta compiler generates error

Reported by: anthony Owned by: Hartmut Kaiser
Milestone: Boost 1.43.0 Component: wave
Version: Boost Development Trunk Severity: Problem
Keywords: wave msvs10 compilation problem Cc:

Description

file: boost\wave\util\cpp_include_paths.hpp (line 89).

This is because MS splitted std::pair (in order to use new move semantics syntax).

generated error: "_include_paths.hpp(89): error C2440: 'specialization' : cannot convert from 'std::string std::_Pair_base<_Ty1,_Ty2>::* ' to 'std::string std::pair<_Ty1,_Ty2>::* '

with [

_Ty1=std::string, _Ty2=std::string

] Standard conversion from pointer-to-member of base to pointer-to-member of derived is not applied for template arguments

"

and

" _include_paths.hpp(146) : see reference to class template instantiation 'boost::wave::util::bidirectional_map<FromType,ToType>' being compiled

with [

FromType=std::string, ToType=std::string

]

"

The current workaround may be to define "BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS" to use boost::multi_index::member_offset instead of "member".

Change History (11)

comment:1 by Hartmut Kaiser, 13 years ago

Resolution: fixed
Status: newclosed

(In [53455]) Wave: fixed compilation problems on VC10 beta 1 (fixes #3106)

comment:2 by anthony akentiev, 13 years ago

Thank you, Hartmut!

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

Milestone: Boost 1.40.0Boost 1.42.0
Resolution: fixed
Status: closedreopened
Version: Boost 1.39.0Boost Development Trunk

This error is occuring again with VC10 Beta 2.

Changing the previous fix to compare _MSC_FULL_VER with 160021003 instead of 160020506 allows it to compile.

comment:4 by Hartmut Kaiser, 13 years ago

Resolution: fixed
Status: reopenedclosed

(In [57192]) Wave: fixing compilation for VC10 Beta2 (fixes #3106)

comment:5 by rwebb <richard.webb@…>, 13 years ago

Milestone: Boost 1.42.0Boost 1.43.0
Resolution: fixed
Status: closedreopened

Time for round 3 - it's failing again in the VC10 release candidate.

_MSC_FULL_VER is now 160030128.

comment:6 by Hartmut Kaiser, 13 years ago

Resolution: fixed
Status: reopenedclosed

(In [59667]) Wave: fixing compilation for VC10 RC (fixes #3106)

comment:7 by rwebb <richard.webb@…>, 13 years ago

Resolution: fixed
Status: closedreopened

Hopefully the last time for this!

This problem still occurs in the release version of VC10. _MSC_FULL_VER is 160030319 if that is still needed.

comment:8 by Hartmut Kaiser, 13 years ago

Resolution: fixed
Status: reopenedclosed

(In [61286]) Wave: fixed #3106: wave on VS2010 beta compiler generates error

comment:9 by Joël Conraud <jconraud@…>, 12 years ago

By doing a change local to a wave file, anyone trying to use multiindex with vs2010 in a way similar to the way used in wave will face the same issue. I discovered that the hard way... because I have faced the same issue in my code and I found this ticket by googling for a solution ;-)

I believe a special case for vs2010 should be done at a more central location inside boost, setting BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS for this compiler globally, rather than doing so locally inside wave part. What do you think?

comment:10 by Sebastian Redl, 12 years ago

I would like it globally (PropertyTree also needs it). but the macro name is wrong. It's not an issue with member pointers as template parameters - VS2010 is actually perfectly conforming in that it doesn't allow conversions for them (defect in the standard IMO). It's an issue with std::pair, because its members aren't direct members of pair itself. That also means it shouldn't depend on the compiler version, but on the standard library version, as an Intel compiler integrated with VS2010 exhibits the same problem.

So I think the name should be BOOST_NO_DIRECT_PAIR_MEMBERS or something like that.

comment:11 by Joël Conraud <jconraud@…>, 12 years ago

Your proposal sounds pretty good to me. I'm all for it!

Note: See TracTickets for help on using tickets.