Я новичок в блиц ++. Пока все хорошо, но я немного озадачен, почему закомментированная строка в приведенном ниже коде не компилируется с
error: conversion from ‘blitz::_bz_tinyMatExpr<blitz::_bz_tinyMatrixMatrixProduct<double, double, 3, 3, 3, 3, 1, 3, 1> >’ to non-scalar type ‘const m33’ requested
Я нахожусь на Debian / Lenny (g ++ 4.3.2, Blitz 0.9).
Вот код:
#include <blitz/blitz.h>
#include <blitz/array.h>
#include <blitz/matrix.h>
#include <blitz/matexpr.h>
#include <blitz/tinymat.h>
#include <blitz/tinymatexpr.h>
#include <blitz/tinyvec.h>
#include <blitz/tinyvec-et.h>
#include <blitz/vector.h>
#include <blitz/vector-et.h>
typedef blitz::TinyVector<double,3> v3;
typedef blitz::TinyMatrix<double,3,3> m33;
int main(int,char**)
{
const m33 a;
const m33 b;
m33 c;c=blitz::product(a,b); // Compiles OK
//const m33 d=blitz::product(a,b); // Fails to compile.
return 0;
}
Мне нравится быть прикованным к рукояти, поэтому было бы неплохо узнать, есть ли способ заставить его работать (опыт работы с Blitz ++ до сих пор предполагает, что это может быть просто вопрос выбора правильных включений). ...).