delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/26/17:29:52

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <004601c146c7$34103c40$b07217c3@a7l9r8>
From: "Marco Craveiro" <soupdragon AT clix DOT pt>
To: <cygwin AT cygwin DOT com>
References: <001b01c146b2$0c071bc0$6501a8c0 AT dns DOT rcn DOT net>
Subject: Re: 1.3.3: g++ dislikes attempt to inherit from char_traits<char>
Date: Wed, 26 Sep 2001 22:09:50 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211

I did a quick grep and I cant find char_traits, but if you replace that by
string_char_traits
it compiles nicely. this is probably one of those cases where g++ is not
quite standard; I had some issues with strstream as well. eagerly waiting
for 3.0 :-))

Marco

----- Original Message -----
From: Robert Allan Schwartz <notbob AT tessellation DOT com>
To: <cygwin AT cygwin DOT com>
Sent: Wednesday, September 26, 2001 7:38 PM
Subject: 1.3.3: g++ dislikes attempt to inherit from char_traits<char>


> Source code:
>
> #include <iostream>
> #include <string>
>
> using namespace std;
>
> class case_insensitive_traits : public char_traits<char>
> {
> };
>
> typedef basic_string<char, case_insensitive_traits>
> case_insensitive_string;
>
> int main(void)
> {
>  case_insensitive_string alphabet("AbCdEfGhIjKlMnOpQrStUvWxYz");
>
>  return 0;
> }
>
> Compilation errors:
>
> deleteme.cpp:6: parse error before `<'
> /usr/include/g++-3/std/bastring.h: In instantiation of
> `basic_string<char,case_insensitive_traits,__default_alloc_template<fals
> e,0> >':
> deleteme.cpp:14:   instantiated from here
> /usr/include/g++-3/std/bastring.h:131: invalid use of undefined type
> `class case_insensitive_traits'
> deleteme.cpp:6: forward declaration of `class case_insensitive_traits'
> /usr/include/g++-3/std/bastring.h: In method `class
> basic_string<char,case_insensitive_traits,__default_alloc_template<false
> ,0> > &
> basic_string<char,case_insensitive_traits,__default_alloc_template<false
> ,0> >::assign(const char *)':
> /usr/include/g++-3/std/bastring.h:178:   instantiated from
> `basic_string<char,case_insensitive_traits,__default_alloc_template<fals
> e,0> >::basic_string(const char *)'
> deleteme.cpp:14:   instantiated from here
> /usr/include/g++-3/std/bastring.h:220: no method
> `case_insensitive_traits::length'
> /usr/include/g++-3/std/bastring.cc: In method `void
> basic_string<char,case_insensitive_traits,__default_alloc_template<false
> ,0> >::Rep::copy(unsigned int, const char *, unsigned int)':
> /usr/include/g++-3/std/bastring.cc:72:   instantiated from
> `basic_string<char,case_insensitive_traits,__default_alloc_template<fals
> e,0> >::Rep::clone()'
> /usr/include/g++-3/std/bastring.h:75:   instantiated from here
> /usr/include/g++-3/std/bastring.cc:139: no method
> `case_insensitive_traits::copy'
>
> Thanks,
>
> Robert Schwartz
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019