ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: Devel@lists.altlinux.org
Subject: Re: [devel] parse error in template argument list
Date: Fri, 8 Dec 2006 18:11:20 +0300
Message-ID: <20061208151120.GP5381@master.mivlgu.local> (raw)
In-Reply-To: <457978FE.2090304@altlinux.ru>

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

On Fri, Dec 08, 2006 at 04:38:54PM +0200, Slava Dubrovskiy wrote:
> Наткнулся на такую ситуацию при сборке firebird. Вот пример:
> 
> $cat test.cpp
> 
> #include <sys/types.h>
> 
> template <typename Object, size_t Capacity = 16>
> class Stack
> {
>     private:
>         void* stk;
>         void* stk_cache;
> 
>     public:
>         explicit Stack<Object, Capacity>()
>             : stk(0), stk_cache(0) { }
> 
>         Stack<Object, Capacity>()
>             : stk(0), stk_cache(0) { }
> 
>         ~Stack<Object, Capacity>()

А если тут везде написать вместо Stack<Object, Capacity> просто Stack (без
явного указания параметров)?

>         {
>             delete stk;
>             delete stk_cache;
>         }
> }; // class Stack
> 
> int main(int argc, char* argv)
> {
>     return(0);
> }
> 
> $ g++-3.4 -o test test.cpp
> $ g++-4.1 -o test test.cpp
> test.cpp:17: error: parse error in template argument list
> 
> $ rpm -qa | grep gcc
> gccmakedep-1.0.1-alt1
> gcc4.1-doc-4.1.1-alt10
> gcc-c++-common-1.4.10-alt1
> gcc3.4-3.4.5-alt6
> gcc-common-1.4.10-alt1
> gcc3.4-c++-3.4.5-alt6
> libgcc4.1-4.1.1-alt10
> gcc4.1-c++-4.1.1-alt10
> gcc4.1-4.1.1-alt10

А 4.1.1-alt9 собирает и в таком виде...

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2006-12-08 15:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08 14:38 Slava Dubrovskiy
2006-12-08 14:50 ` Denis Kirienko
2006-12-08 15:11 ` Sergey Vlasov [this message]
2006-12-08 15:46   ` Slava Dubrovskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061208151120.GP5381@master.mivlgu.local \
    --to=vsu@altlinux.ru \
    --cc=Devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git