[OpenWalnut-Dev] Question concerning some template code

Mathias Goldau math at informatik.uni-leipzig.de
Sun Mar 6 18:42:40 CET 2011


Am 05.03.2011 22:33, Alexander Wiebel wrote:
> Hi guys.
> 
> I have a problem with some of OpenWalnut's template code and
> VisualStudio's compiler.
[...]

> If I do not do this I get error messages like the following for
> WTensorSym.h
> 
> 31>c:\users\bzfwiebe\development\w\openwalnut\src\datahandler\../common/math/WTensorSym.h(99)
> : error C3200: 'WTensorBaseSym<order,dim,Data_T>' : invalid template
> argument for template parameter 'TensorBase_T', expected a class template
> 31>        with
> 31>        [
> 31>            order=2,
> 31>            dim=3,
> 31>            Data_T=float
> 31>        ]
> 31>       
[...]

> Any Ideas?

It seems that somehow the first template argument is not recognized as
template, again. Sometimes it helps to say explicitly that this is a
type identifier by:

 template< std::size_t order, std::size_t dim, typename Data_T >
 WTensor< order, dim, Data_T >::WTensor()
    : WTensorFunc< typename WTensorBase, order, dim, Data_T >()

HTH
math


More information about the OpenWalnut-Dev mailing list