patrickh 2005/06/01 15:09:01 PDT
Modified files:
modules/GMTL/python/src gmtl-wrappers.h
modules/GMTL/python/src/gmtl _gmtl_wrappers_h.cpp
Log:
Make an extremely aggrivating concession for Visual C++ to allow
gmtl::makeDirCos<T>() to be accessible from Python on Windows. From what I
can tell, Visual C++ cannot determine the full type instantiation of a
templated type when it is used as a default function parameter value. For
example:
template<typename T>
void f(const gmtl::Vec<T, 3>& v = gmtl::Vec<T, 3>(0, 0, 0))
{
// Do something ...
}
Visual C++ 7.1 and 8.0 Beta 2 both complain that gmtl::Vec<T, 3> has no
constructors, which normally indicates that the type in question is not
fully declared before being used (see error C2514).
There may be a better solution to this that could come in different forms.
I would like very much to see this revision backed out at some point in
the future. For now, however, this fixes the last remaining problem with
the PyGMTL interface not being consistent across platforms, and that is a
much bigger issue than simplicity of code.
Revision Changes Path
1.10 +64 -60 GGT/modules/GMTL/python/src/gmtl-wrappers.h
1.7 +2 -4 GGT/modules/GMTL/python/src/gmtl/_gmtl_wrappers_h.cpp
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ggt/GGT/modules/GMTL/python/src/gmtl-wrappers.h.diff?r1=1.9&r2=1.10&diff_format=l
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ggt/GGT/modules/GMTL/python/src/gmtl/_gmtl_wrappers_h.cpp.diff?r1=1.6&r2=1.7&diff_format=l
|