Hi,

 > There is this mysterious line in scalar_expression<>'s definition:
>
> private:
>          typedef typename LHS::value_type          DummyType; //Visual
> C++ 2005 does not allow to write LHS::value_type::value_type
>
> This prevents us from using a scalar expression whose LHS is a
> scalar_expression.

Hmm, this might be outdated thanks to the use of the traits-mechanism in 
the subsequent line. Just using
   result_of::cpu_value_type<LHS>::type
for the ScalarType typedef might work. Please let me know if this is 
insufficient.


> The comment is slightly mysterious. Is
> typedef typename LHS::value_type          value_type; not allowed?
> I can't believe that VS would break template recursion so easily, but
> perhaps I'm wrong.

The original typedef for ScalarType was
  typedef typename LHS::value_type::value_type  ScalarType;
and this indeed caused the compilation to fail on VS 2005. The error 
wasn't reproducible in a super-simple context, so some more complex 
interaction was necessary to cause this. With the traits-stuff things 
should work, just give it a try. Maybe you have to add one or two 
additional overloads for result_of::cpu_value_type

Best regards,
Karli


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to