Opened 17 years ago
Closed 17 years ago
#209 closed defect (fixed)
lp_test.cc fails to compile with VS2005
| Reported by: | Akos Ladanyi | Owned by: | Balazs Dezso |
|---|---|---|---|
| Priority: | major | Milestone: | LEMON 1.1 release |
| Component: | core | Version: | hg main |
| Keywords: | Cc: | ||
| Revision id: | efec3c133e74 |
Description
This is the error message:
------ Build started: Project: lp_test, Configuration: Debug Win32 ------
Compiling...
lp_test.cc
..\..\test\lp_test.cc(55) : error C2664: 'void lemon::LpBase::colUpperBound(lemon::LpBase::Col,lemon::LpBase::Value)' : cannot convert parameter 1 from 'std::vector<_Ty>' to 'lemon::LpBase::Col'
with
[
_Ty=lemon::LpBase::Col
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\..\test\lp_test.cc(56) : error C2664: 'void lemon::LpBase::colBounds(lemon::LpBase::Col,lemon::LpBase::Value,lemon::LpBase::Value)' : cannot convert parameter 1 from 'std::vector<_Ty>' to 'lemon::LpBase::Col'
with
[
_Ty=lemon::LpBase::Col
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\..\test\lp_test.cc(62) : error C2664: 'void lemon::LpBase::colUpperBound(lemon::LpBase::Col,lemon::LpBase::Value)' : cannot convert parameter 1 from 'std::vector<_Ty>' to 'lemon::LpBase::Col'
with
[
_Ty=lemon::LpBase::Col
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\..\test\lp_test.cc(63) : error C2664: 'void lemon::LpBase::colBounds(lemon::LpBase::Col,lemon::LpBase::Value,lemon::LpBase::Value)' : cannot convert parameter 1 from 'std::vector<_Ty>' to 'lemon::LpBase::Col'
with
[
_Ty=lemon::LpBase::Col
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\..\test\lp_test.cc(75) : error C2664: 'void lemon::LpBase::colUpperBound(lemon::LpBase::Col,lemon::LpBase::Value)' : cannot convert parameter 1 from 'std::map<_Kty,_Ty>' to 'lemon::LpBase::Col'
with
[
_Kty=int,
_Ty=lemon::LpBase::Col
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\..\test\lp_test.cc(76) : error C2664: 'void lemon::LpBase::colBounds(lemon::LpBase::Col,lemon::LpBase::Value,lemon::LpBase::Value)' : cannot convert parameter 1 from 'std::map<_Kty,_Ty>' to 'lemon::LpBase::Col'
with
[
_Kty=int,
_Ty=lemon::LpBase::Col
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Attachments (1)
Change History (6)
comment:1 follow-up: 2 Changed 17 years ago by
comment:2 Changed 17 years ago by
Moreover if you swap the code lines in lp_base.h related to colUpperBound and colLowerBound
lp.colUpperBound(x,1);
is going to compile and
lp.colLowerBound(x,1);
is not.
Changed 17 years ago by
| Attachment: | ticket209_67d4e07336d7.patch added |
|---|
comment:3 follow-up: 4 Changed 17 years ago by
The attached patch ticket209_67d4e07336d7.patch fixes the bug. The bug and the solution is not too meaningful bug.
comment:4 Changed 17 years ago by
Replying to jtapolcai:
The attached patch ticket209_67d4e07336d7.patch fixes the bug. The bug and the solution is not too meaningful bug.
Could someone have a look at this ticket so that we can put it in the main branch?
comment:5 Changed 17 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
The changeset (with different commit log) is in the main branch now, see [2eb5c8ca2c91].


Replying to ladanyi:
This is a very mysterious error.
fails to compile when
xis andstd::vector<LP::Col>, but there is no problem withThe implementation of these functions are exactly the same.
Also, everything is fine with VS2008. (Well, in this respect... :) )