public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nomis80 at nomis80 dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/17470] Visibility attribute ignored for explicit template instantiation
Date: Wed, 22 Dec 2004 20:54:00 -0000	[thread overview]
Message-ID: <20041222205433.29867.qmail@sourceware.org> (raw)
In-Reply-To: <20040913213750.17470.austern@apple.com>


------- Additional Comments From nomis80 at nomis80 dot org  2004-12-22 20:54 -------
I just got hit with that bug and spent too much time figuring out what was
wrong. Here's my code, just to show an example of real-life usage:

//////////////////////////////////////////////////////////////////////////
/**
 * Returns the unsigned version of \a number.
 */
template< class T >
T abs( T number )
{
    // This is the default implementation, using comparison to zero and unary
    // negation operator.
    if ( number < 0 ) {
        return -number;
    }
    return number;
}

// Here are some specific implementations.

template<> bool             WRAP_API abs( bool           number );
template<> char             WRAP_API abs( char           number );
template<> unsigned char    WRAP_API abs( unsigned char  number );
template<> short            WRAP_API abs( short          number );
template<> unsigned short   WRAP_API abs( unsigned short number );
template<> int              WRAP_API abs( int            number );
template<> unsigned int     WRAP_API abs( unsigned int   number );
template<> long             WRAP_API abs( long           number );
template<> unsigned long    WRAP_API abs( unsigned long  number );
template<> float            WRAP_API abs( float          number );
template<> double           WRAP_API abs( double         number );
//////////////////////////////////////////////////////////////////////////

Please fix this bug!

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |s_gccbugzilla at nedprod dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17470


  parent reply	other threads:[~2004-12-22 20:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13 21:37 [Bug c++/17470] New: " austern at apple dot com
2004-09-13 23:40 ` [Bug c++/17470] " bangerth at dealii dot org
2004-09-14  2:20 ` austern at apple dot com
2004-09-14  3:48 ` bangerth at dealii dot org
2004-12-13 20:47 ` efrias at syncad dot com
2004-12-22 20:54 ` nomis80 at nomis80 dot org [this message]
2004-12-22 20:57 ` nomis80 at nomis80 dot org
2004-12-28 23:53 ` pinskia at gcc dot gnu dot org
2005-09-02  0:17 ` jmegq at radiance dot com
     [not found] <bug-17470-3310@http.gcc.gnu.org/bugzilla/>
2006-03-21  3:29 ` jason at gcc dot gnu dot org
2006-06-23  1:11 ` jason at gcc dot gnu dot org
2006-06-30  2:29 ` jason at gcc dot gnu dot org
2006-06-30 15:30 ` pinskia at gcc dot gnu dot org
2006-08-28 12:29 ` jakub at gcc dot gnu dot org

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=20041222205433.29867.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).