public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eljay Love-Jensen <eljay@adobe.com>
To: Thomas Neumann <tneumann@users.sourceforge.net>, gcc-help@gcc.gnu.org
Subject: Re: template specializiation
Date: Thu, 07 Jul 2005 14:46:00 -0000	[thread overview]
Message-ID: <6.2.1.2.2.20050707085151.025778e0@iplan-mn.corp.adobe.com> (raw)
In-Reply-To: <42CD3120.5040906@users.sourceforge.net>

Hi Thomas,

Hmmm, unusual situation (for me).

Using...
http://www.comeaucomputing.com/tryitout/

I tend to trust (EDG's front end) Comeau C++'s error message (strict mode, -tused) on this one.

How to unravel this riddle, I'm not sure.  Sorry.

--Eljay

- - - - -
struct A
{
  const A* a;
};

template <const char* c>
struct B
{
  static const A b;
};

extern const char c[1]="";
extern const char d[1]="";

template<>
const A B<c>::b =
{
  &B<d>::b
};
template<>
const A B<d>::b = // Line 21
{
  &B<c>::b
};
- - - - - 

Comeau C/C++ 4.3.3 (Aug  6 2003 15:13:37) for ONLINE_EVALUATION_BETA1
Copyright 1988-2003 Comeau Computing.  All rights reserved.
MODE:strict errors C++

"ComeauTest.c", line 21: error: explicit specialization of member
          "B<c>::b [with c=d]" must precede its first use
  const A B<d>::b = 
                ^

"ComeauTest.c", line 24: warning: parsing restarts here after previous syntax error
  };
   ^

1 error detected in the compilation of "ComeauTest.c".


  reply	other threads:[~2005-07-07 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07 13:42 Thomas Neumann
2005-07-07 14:46 ` Eljay Love-Jensen [this message]
2005-07-07 15:25   ` corey taylor
2005-07-07 15:51     ` Thomas Neumann
2005-07-07 15:56       ` corey taylor
     [not found]         ` <42CD567F.2090702@users.sourceforge.net>
2005-07-07 16:39           ` corey taylor
2005-07-07 16:39           ` corey taylor
2005-07-07 19:34             ` Thomas Neumann

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=6.2.1.2.2.20050707085151.025778e0@iplan-mn.corp.adobe.com \
    --to=eljay@adobe.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=tneumann@users.sourceforge.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).