Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"Invalid template parameter default" error for vigra library, SS1

807575Mar 17 2009 — edited Apr 7 2009
Hi,

I am having problems compiling a simple program against the Vigra image processing library (http://hci.iwr.uni-heidelberg.de/vigra/). Compiles fine under g++ okay.

SunOS cactus 5.10 Generic_137111-06 sun4u sparc SUNW,Sun-Blade-1500

which CC:
/n/server2/opt/studio12/SUNWspro/bin/CC

Error message:

"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 73: Error: Invalid template parameter default.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 73: Error: Function templates may not have default template parameters.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 73: Error: other is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 73: Error: A declaration does not specify a tag or an identifier.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 73: Error: Templates can only declare classes or functions.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 78: Error: A declaration was expected instead of "protected".
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 79: Error: ImageType is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 82: Error: A declaration was expected instead of "public".
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 85: Error: ImageType is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 87: Error: vigra::ImageVector is not a namespace or class name.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 87: Error: iterator is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 88: Error: vigra::ImageVector is not a namespace or class name.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 88: Error: const_iterator is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 89: Error: vigra::ImageVector is not a namespace or class name.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 89: Error: reverse_iterator is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 90: Error: vigra::ImageVector is not a namespace or class name.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 90: Error: const_reverse_iterator is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 91: Error: vigra::ImageVector is not a namespace or class name.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 91: Error: reference is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 92: Error: vigra::ImageVector is not a namespace or class name.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 92: Error: const_reference is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 94: Error: vigra::ImageVector is not a namespace or class name.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 94: Error: pointer is not defined.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 96: Error: vigra::ImageVector is not a namespace or class name.
"/oudvmt/sparc_SunOS5.10/src/pub/vigra1.6.0/include/vigra/imagecontainer.hxx", line 96: Error: difference_type is not defined.


Here is the declaration that is causing the problem.

template <class ImageType, class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other >
class ImageArray
{
Size2D imageSize_;

Thanks!
Mark

Edited by: LLEMark on Mar 17, 2009 12:37 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2009
Added on Mar 17 2009
8 comments
175 views