ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Прокопьев Евгений" <john@rmts.donpac.ru>
To: community@altlinux.ru
Subject: Re: [Comm] Re: Компоновка с STL в gcc3
Date: Tue, 15 Apr 2003 08:13:01 +0400
Message-ID: <3E9B86CD.5090706@rmts.donpac.ru> (raw)
In-Reply-To: <20030414172525.5e7481c5.vsu@altlinux.ru>

> А, так вы пытаетесь работать с std::basic_string<unsigned char>.
> 
> Надо делать специализацию std::char_traits<unsigned char>.  В
> стандартном C++ <string> должен определять специализации только для
> char и wchar_t - что он и делает в gcc3.  Для общего случая
> определяется только пустышка без реализации.


$ make clean
rm -f *.o requester
$ make
g++    -c -o requester.o requester.cpp
g++    -c -o serial.o serial.cpp
g++    -c -o sulim.o sulim.cpp
sulim.cpp: In member function `void sulim_device::check(byte*, byte*, 
byte*)':
sulim.cpp:70: no matching function for call to 
`std::char_traits<byte>::append(byte*, int)'
sulim.cpp:72: no matching function for call to 
`std::char_traits<byte>::find(byte*&)'
/usr/include/c++/3.2.1/bits/char_traits.h:79: candidates are: static 
const _CharT* std::char_traits<_CharT>::find(const _CharT*, unsigned 
int, const _CharT&) [with _CharT = byte]
sulim.cpp:72: `struct std::char_traits<byte>' has no member named `npos'
sulim.cpp:73: no matching function for call to 
`std::char_traits<byte>::find(byte*&)'
/usr/include/c++/3.2.1/bits/char_traits.h:79: candidates are: static 
const _CharT* std::char_traits<_CharT>::find(const _CharT*, unsigned 
int, const _CharT&) [with _CharT = byte]
sulim.cpp:73: `struct std::char_traits<byte>' has no member named `npos'
sulim.cpp:78: no matching function for call to 
`std::char_traits<byte>::length()'
/usr/include/c++/3.2.1/bits/char_traits.h:76: candidates are: static 
size_t std::char_traits<_CharT>::length(const _CharT*) [with _CharT = byte]
sulim.cpp:79: no match for `byte_queue& [unsigned int&]' operator
sulim.cpp:84: no matching function for call to 
`std::char_traits<byte>::find(byte*&)'
/usr/include/c++/3.2.1/bits/char_traits.h:79: candidates are: static 
const _CharT* std::char_traits<_CharT>::find(const _CharT*, unsigned 
int, const _CharT&) [with _CharT = byte]
sulim.cpp:84: `struct std::char_traits<byte>' has no member named `npos'
make: *** [sulim.o] Ошибка 1

Это случилось после того, как basic_string<unsigned char> я заменил на 
char_traits<unsigned char>.

Собственно вопрос: где искать реализацию для char, чтобы методом 
копировать/вставить/заменить сделать аналог (как-то все это не 
по-человечьи), и где читать:

a) про реализацию стандарта C++ в gcc3
б) про саму стандартную библиотеку C++ (по C маны есть, а тут не 
предусмотрели :( )

-- 
С уважением, Прокопьев Евгений



  reply	other threads:[~2003-04-15  4:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-14 10:41 [Comm] " Прокопьев Евгений
2003-04-14 12:12 ` [Comm] " Sergey Vlasov
2003-04-14 12:52   ` Прокопьев Евгений
2003-04-14 13:25     ` Sergey Vlasov
2003-04-15  4:13       ` Прокопьев Евгений [this message]
2003-04-15 11:42         ` Sergey Vlasov

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=3E9B86CD.5090706@rmts.donpac.ru \
    --to=john@rmts.donpac.ru \
    --cc=community@altlinux.ru \
    /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

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git