typedef with template class
Stefan Rank
Stefan.Rank@scai.FhG.de
Thu Nov 21 06:53:00 GMT 2002
Category: c++ - C++ front end
Synopsis: typedef with template class
Class: accepts-illegal
-----------
Description:
Illegal typedef: HalfedgeDS_default must have at least one template
#include <CGAL/HalfedgeDS_default.h>
typedef CGAL::HalfedgeDS_default HDS;
int main() {}
-----------
Fix:
template class HalfedgeDS_default must have at least one template parameter:
typedef CGAL::Cartesian<double> Kernel;
typedef CGAL::HalfedgeDS_default<Kernel> HDS;
-----------
g++ -v -save-temps
'-I/home/rank/local/CGAL-2.4/include/CGAL/config/sparc_SunOS-5.8_g++-3.2.0'
'-I/home/rank/local/CGAL-2.4/include' -g -Wall
-L/home/rank/local/CGAL-2.4/lib/sparc_SunOS-5.8_g++-3.2.0 -lCGAL
typedef_bug.cpp
Reading specs from
/home/rank/local/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/home/rank/local/gcc-3.2
Thread model: posix
gcc version 3.2
/home/rank/local/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.2/cpp0
-lang-c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -v
-I/home/rank/local/CGAL-2.4/include/CGAL/config/sparc_SunOS-5.8_g++-3.2.0
-I/home/rank/local/CGAL-2.4/include -D__GNUC__=3 -D__GNUC_MINOR__=2
-D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix
-D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__
-D__unix__ -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc
-D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__
-D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1
-D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int
-D__PTRDIFF_TYPE__=int -D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long
int -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc typedef_bug.cpp
-Wall typedef_bug.ii
GNU CPP version 3.2 (cpplib) (sparc ELF)
ignoring nonexistent directory
"/home/rank/local/gcc-3.2/sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
/home/rank/local/CGAL-2.4/include/CGAL/config/sparc_SunOS-5.8_g++-3.2.0
/home/rank/local/CGAL-2.4/include
/home/rank/local/gcc-3.2/include/c++/3.2
/home/rank/local/gcc-3.2/include/c++/3.2/sparc-sun-solaris2.8
/home/rank/local/gcc-3.2/include/c++/3.2/backward
/usr/local/include
/home/rank/local/gcc-3.2/include
/home/rank/local/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.2/include
/usr/include
End of search list.
/home/rank/local/gcc-3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.2/cc1plus
-fpreprocessed typedef_bug.ii -quiet -dumpbase typedef_bug.cpp -g -Wall
-version -o typedef_bug.s
GNU CPP version 3.2 (cpplib) (sparc ELF)
GNU C++ version 3.2 (sparc-sun-solaris2.8)
compiled by GNU C version 3.2.
typedef_bug.cpp:3: `template<class Traits_, class HalfedgeDSItems, class
Alloc>
class CGAL::HalfedgeDS_default' as declarator
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typedef_bug.ii.bz2
Type: application/octet-stream
Size: 86597 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20021121/b62a54a3/attachment.obj>
More information about the Gcc-bugs
mailing list