Sender: mckee AT rtp DOT gtegsc DOT com Message-ID: <333A86BD.255E@rtp.gtegsc.com> Date: Thu, 27 Mar 1997 09:39:57 -0500 From: David McKee Organization: GTE (My views are my own) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Templates in the STL References: <199703262318 DOT SAA01194 AT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have recently downloaded the STL to use as a foundation for my development. I have not yet used it with DJGPP but I have seen other posts here that it works great. I have one question concerning the syntax of templates. I have attempted to compile on a Sun machine running SunOS 5.4 and the SPARCompiler version 4.0.1 using C/C++ SC3.0.1 (that may mean nothing to most of you and thats okay...) For the following template syntax in the STL include file "function.h": . . . template struct constant_unary_fun : public unary_function { result_type val; constant_unary_fun(const result_type& v) : val(v) {} const result_type& operator()(const argument_type&) const { return val; } }; . . . I get errors for the '=' as the compiler syas it is expecting a ',' or another class, etc. My question is: Is the = sign in templates a new and widely unsupported feature of templates? If so, does djgpp and gcc handle them correctly? Is there work arounds for this as I am just learning the intracies of templates. Thanks in advance! -- David T. McKee: -- Think: Innovative Science Learning Systems -- Physics, Electrical Science, Computer -- Science, Natural Science, Theology ======================Signature Block==================== It is the glory of God to conceal a matter; To search out a matter is the glory of kings. Pr 25:2 --------------------------------------------------------- There is nothing so sacred as it cannot be looked into... =========================================================