public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mark Tall <mtall.qld@gmail.com>
To: gcc@gcc.gnu.org
Subject: c++ template conformance: gcc vs MS
Date: Thu, 28 May 2009 06:12:00 -0000	[thread overview]
Message-ID: <454c00060905272153o71d0e84ax465ded852fd536a1@mail.gmail.com> (raw)

Hello,

I've come across a possible issue with GCC's adherence to the C++
standard for handling template code (gcc version 4.3.2 20081105 from
Fedora 10).

The following code compiles fine under GCC (using -pedantic and
-std=c++98), but fails under Microsoft's C++ 2008 SP1.

Microsoft explains this on
http://msdn.microsoft.com/en-us/library/cx7k7hcf(VS.80).aspx

Is GCC or Microsoft at fault ?


Code (from a header file):

template<typename T1>
struct get_num_type
  { typedef T1 num_type; };

template<>  // this line causes the problem
template<typename T2>
struct get_num_type< std::complex<T2> >
{ typedef T2 num_type; };

MS compilers gives:
error C2910: 'arma::get_pod_type<std::complex<_Other>>' : cannot be
explicitly specialized

             reply	other threads:[~2009-05-28  4:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28  6:12 Mark Tall [this message]
2009-05-28  9:35 ` Mark Tall
2009-05-28 10:07   ` Andrew Pinski
2009-05-28 15:45     ` Mark Tall
2009-05-28 16:42       ` Daniel Berlin

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=454c00060905272153o71d0e84ax465ded852fd536a1@mail.gmail.com \
    --to=mtall.qld@gmail.com \
    --cc=gcc@gcc.gnu.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
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).