• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: gcc4.0, char_traits termplate specialization error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc4.0, char_traits termplate specialization error


  • Subject: Re: gcc4.0, char_traits termplate specialization error
  • From: Steve Checkoway <email@hidden>
  • Date: Fri, 10 Feb 2006 03:05:50 -0800


On Feb 9, 2006, at 5:24 PM, Howard Hinnant wrote:

The standard doesn't promise that this will work. If myChar is a typedef for a built-in type (unsigned short is a popular choice), the standard outright forbids this type of specialization for any std template. If myChar is a struct/class, the standard again (more weakly) forbids it because the primary char_traits template is not promised to exist beyond a simple forward declaration, nor has any specification (such as a member function assign).

I recall reading about specializing char_traits on some mailing list (and googling it seems to come up fairly often). I've never seen an explanation for forbidding specializing a std template. In this case, it seems to render char_traits pretty much useless. Is there a reason for it, or is it another one of those cases where the standard's committee got together and flipped coins to see what they would allow?


- Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >gcc4.0, char_traits termplate specialization error (From: "Alex Sheh" <email@hidden>)
 >Re: gcc4.0, char_traits termplate specialization error (From: Howard Hinnant <email@hidden>)

  • Prev by Date: How are we supposed to paste text in XCode?
  • Next by Date: Convert double between Big-Endian and Little-Endian
  • Previous by thread: Re: gcc4.0, char_traits termplate specialization error
  • Next by thread: Excluding files on a per Configuration basis?
  • Index(es):
    • Date
    • Thread