From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "Tan, Qiye" <qiye_tan@brown.edu>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: Where is the definition of some member functions (ex. __gnu_debug::_Safe_iterator_base::_M_detach())?
Date: Sun, 20 Nov 2022 23:13:43 +0000 [thread overview]
Message-ID: <CAH6eHdTB4G73-dzeHSs34YtsXt6xmZm4A_ckfpXeLGwiiLyweQ@mail.gmail.com> (raw)
In-Reply-To: <CAD3s6EJ3SkKOOmC9apuXvAN2uHvBHJUoPp3C9-AAjdi8b=o=OA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]
On Sun, 20 Nov 2022, 19:45 Tan, Qiye via Libstdc++, <libstdc++@gcc.gnu.org>
wrote:
> Hi all,
>
> I'm new in C++ who have an interest in the implementation of C++ STL.
> Recently, I tried to implement my own vector template. However, when I
> implemented my own iterator, I found that I had no idea how to
> detect whether it is dereferencable. Therefore, I began to explore the
> libstdc++, but I found that for some member functions, I can only find the
> declaration but no definition. For example, the 'bool
> __gnu_debug::_Safe_iterator_base::_M_singular( ) const', 'void
> __gnu_debug::_Safe_iterator_base::_M_detach( )', etc. They are declared in
> 'libstdc++-v3/include/debug/safe_base.h'. I can guess that '_M_singular'
> may just check if '_M_sequence' is NULL, but I still want to find their
> definition. Can someone help me? Thank you so much.
>
François and Arsen gave the answer already, but for future reference you
could clone the git repository and use 'git grep _M_singular' to find that.
> Best,
> Qiye Tan
>
prev parent reply other threads:[~2022-11-20 23:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-20 19:45 Tan, Qiye
2022-11-20 20:01 ` Arsen Arsenović
2022-11-20 20:16 ` François Dumont
2022-11-20 23:13 ` Jonathan Wakely [this message]
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=CAH6eHdTB4G73-dzeHSs34YtsXt6xmZm4A_ckfpXeLGwiiLyweQ@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=libstdc++@gcc.gnu.org \
--cc=qiye_tan@brown.edu \
/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).