[gecode-users] LinExp issue with MSVC 9

Filip Konvička filip.konvicka at logis.cz
Thu Mar 20 00:09:19 CET 2008


Hi,

when porting my code from Gecode 1.3.1 to 2.1.1 (MSVC 2008 Express 
Edition), the following code

GECODE_ES_CHECK((GqBin<int, IntView, MinusView>::post(home, start[i], 
iv, d)));

("home" is my Space*, "start[i]" is an IntView, "iv" is a MinusView, and 
"d" is an int) worked well with Gecode 1.3.1, but with 2.1.1 I'm getting

C:\lib\gecode-2-vc90\gecode/int/linear.hh(82) : error C4263: 
'Gecode::Reflection::ActorSpec 
Gecode::Int::Linear::LinBin<Val,A,B,pc>::spec(const Gecode::Space 
*,Gecode::Reflection::VarMap &,const Gecode::Support::Symbol &) const' : 
member function does not override any base class virtual member function
        with
        [
            Val=int,
            A=Gecode::Int::IntView,
            B=Gecode::Int::MinusView,
            pc=1
        ]
        C:\lib\gecode-2-vc90\gecode/int/linear.hh(307) : see reference 
to class template instantiation 
'Gecode::Int::Linear::LinBin<Val,A,B,pc>' being compiled
        with
        [
            Val=int,
            A=Gecode::Int::IntView,
            B=Gecode::Int::MinusView,
            pc=1
        ]

It seems that spec() has more arguments in LinBin than in Actor, so the 
compiler chokes. (Note that the function is not explicitly "virtual" in 
LinBin.) This is a "Level 4" warning 4263, which I used to have turned 
into error using, so I wonder whether this should be fixed in Gecode or 
not. The warning says that LinBin::spec() effectively hides 
Actor::spec() in LinBin (which might be intentional, of course, but the 
compiler probably doubts that).

Thanks,
Filip





More information about the gecode-users mailing list