1 Reply Latest reply on Dec 30, 2009 3:52 PM by drstrip

    template specialization failure in VS2008, but OK in 2005

    drstrip

      The following subkernel compiles correctly in VS2005, but fails in VS2008

      kernel uint4 compareToNeighbor(uint4 new_spin<>, uint4 neighbor<>)
      {
        return (uint4)(((int4) new_spin != (int4) neighbor) & int4(1,1,1,1));
      }

      The error in VS2008 is -

      1>c:/Users/drstrip/Documents/Visual Studio 2008/Projects/PotsModel/pots.br(8) : error C2893: Failed to specialize function template 'vec::type,LUB::size> vec::operator &(const BRT_TYPE &) const'
      1>        with
      1>        [
      1>            VALUE=char,
      1>            tsize=4
      1>        ]
      1>        With the following template arguments:
      1>        'vec'
      1>        with
      1>        [
      1>            VALUE=int,
      1>            tsize=4
      1>        ]
      1>c:/Users/drstrip/Documents/Visual Studio 2008/Projects/PotsModel/pots.br(8) : error C2676: binary '&' : 'vec' does not define this operator or a conversion to a type acceptable to the predefined operator
      1>        with
      1>        [
      1>            VALUE=char,
      1>            tsize=4
      1>        ]

       

      Any help would be welcome.