我想为具有不同策略的不同数组类编写一个包装器。
例如:
typedef ArrayType<useValArray,StdAllocator> Array; // one global assignment
我想像 blitz++ Array 一样使用这个类
例如:
Array<double,2> x(2,2); //maps the Array to an Valarray or to a Blitz++ Array
Array<double,2> x2(5,6);
这是可能的吗?我需要哪些技术来实现这一点?