From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id CF87A3858D32 for ; Sun, 20 Nov 2022 23:13:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CF87A3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x636.google.com with SMTP id vv4so15600875ejc.2 for ; Sun, 20 Nov 2022 15:13:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hzm+HkJ7JOmwV0yZwgdu09AVdrmngPsXN9jX2AcitDc=; b=TaTqQnVNO9mfN+PZt1NtCG9isAMXxewQHOqXTn6sTSJFi/yNqPhYxKudhunDLclhKe XFPDvAyLy4EAzyrT/CLBtWfqqfk+z9WNdarxIxqbyFZ9j7L6pVfkfp6COuvfLLA0mlPh WVzGePNl82AP7LC8NU5g6UtB1FmAB5v6F6tVKVq9APz+Onsv7i3j3FudahgC8cp1pEEf GYQkCwL+J8hN1uuZL4Oain0PZCw1sSPKcMRgVIzq9x3nTx5j/yrWiobS/6waV4YC/LrC aNkd93GrYL7VagZ6ciwJ0bEVz9iqVEBuGQ4IfS5eAqOI0wk4zycaYBG8XTqg3woe9MW+ RQ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hzm+HkJ7JOmwV0yZwgdu09AVdrmngPsXN9jX2AcitDc=; b=1OVND28F2AIT1r8ktbWuGbNekTZszkhl27Jh4X0w0Bq5kSZTDT7JCZOSyuQ22SMjfN XydLnrW93bfxvAaOXvnptlWtAxxl3hLIarUYOHqR/NGyHnNKKuC4fbrQtqYlrO48aNB8 djW7ULJ3Tv/I6ha0g7NQuBDdiSbX7xu1k55wU3GVD/KTS0QIa/uupkcs1JL4VjCZBNrv Eo3rNWTzNvCxfgcafXHpy5bx5DKnCR+75HRb8NH9IKVA6l+TdVWN2QGawddPJhMkgTCN 27XH8O39zjjbGv9Wbw0Gm+tSgHtH2Bi3acM7wFVMKUxj58EV6OTlIbfiJH/5aS7K4DUm zVnQ== X-Gm-Message-State: ANoB5pkfoIUEfmvwgE19xjZmbzIJpxQnFfTyn8qrIbf2r0Ln8MA9KA1s bUJMOkG00jX3UrdHUXXtZIYDp3FXwL9Qn8FSgWU= X-Google-Smtp-Source: AA0mqf7pldjxi0xR6WyzxTfOuYH8p3Y0XJ/0sCrLbq04qIyj8rQmUbiXprocKj30y+qOB41cMJxBIId0XyctxNb91ZA= X-Received: by 2002:a17:906:a397:b0:7ae:5381:bd02 with SMTP id k23-20020a170906a39700b007ae5381bd02mr12977707ejz.286.1668986036579; Sun, 20 Nov 2022 15:13:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Sun, 20 Nov 2022 23:13:43 +0000 Message-ID: Subject: Re: Where is the definition of some member functions (ex. __gnu_debug::_Safe_iterator_base::_M_detach())? To: "Tan, Qiye" Cc: "libstdc++" Content-Type: multipart/alternative; boundary="000000000000d874f805edef1784" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000d874f805edef1784 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 20 Nov 2022, 19:45 Tan, Qiye via Libstdc++, 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=C3=A7ois and Arsen gave the answer already, but for future reference y= ou could clone the git repository and use 'git grep _M_singular' to find that. > Best, > Qiye Tan > --000000000000d874f805edef1784--