• 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
gcc4.0, char_traits termplate specialization error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc4.0, char_traits termplate specialization error


  • Subject: gcc4.0, char_traits termplate specialization error
  • From: "Alex Sheh" <email@hidden>
  • Date: Thu, 9 Feb 2006 14:15:54 -0800
  • Thread-topic: gcc4.0, char_traits termplate specialization error

Hi All,
This isn’t an Xcode questions per se, but I was wondering if anyone has seen the below problem.  I also posted to gcc-help and libstdc++ lists, but no responses.  Thanks!
 
I recently updated my system from gcc 3.3. to 4.0 (Panther to Tiger), and now I am getting a template error.  For the below code, I get the “error: no member function assign declared in std:::char_traits<myChar>”.
 
typedef std::char_traits<myChar> myTraits; // Interestingly, if I change this to __gnu_cxx::char_traits            
                                                                // then it compiles, but I’m not sure if this is correct/acceptable
template <> void myTraits::assign(myChar& lhs, myChar const& rhs)
{
 // definition
}
 
I looked in char_traits.h and saw that there is a new namepsace __gnu_cxx, with a base struct of the same name as the derived struct in std namespace.  I also came across an libstdc++ archived posting about __gnu_cxx’s char_traits masking the one in std, not sure if this is related to the error I’m getting.  Does changing the typedef to __gnu_cxx::char_traits effectivlely achieve what the previous line of code (std::char_traits) was doing?  Thanks for your help.
 
- Alex
 _______________________________________________
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

  • Follow-Ups:
    • Re: gcc4.0, char_traits termplate specialization error
      • From: Howard Hinnant <email@hidden>
  • Prev by Date: RE: link errors with 10.3.9
  • Next by Date: Re: Help with a hosed system
  • Previous by thread: Re: link errors with 10.3.9
  • Next by thread: Re: gcc4.0, char_traits termplate specialization error
  • Index(es):
    • Date
    • Thread