From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id E0A493858D20 for ; Sun, 20 Nov 2022 19:45:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E0A493858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=brown.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=brown.edu Received: by mail-pl1-x62f.google.com with SMTP id y10so7625150plp.3 for ; Sun, 20 Nov 2022 11:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brown.edu; s=google; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=+0qIHVrEzZFYbvnds0nAVrK5poQCBYzECy5ccGCmx9s=; b=nfSrg8NMs0SIF8hMGoKE8rJ84yO6Cv7lPidvMaYG9KJf3m/XvykZpglNpoTcWzaV4T 6TVmUVyRN4d1K9ULsrJXUyMhbNT2dpQs/n5SIUs48Sj6W+vfLT1JigTjiuK5m6G1/jih Sl9cNpDKyniLoQoZBAX0LTVHtOMe/pckLM/s6tSa62qUVON5thQxlQA8CVE6+OjpGkn7 tTE7M3qcpAqxH1ec2pPnUKmXefUewmOVC3JCKPmKjgsU+WBYT3XsYSD5RKlV0+f2DBhE fnmO+y4yzw3orszto0iNTvTv/jwWgEC+vOtei4s1R3lwygCzmpOpYEzrqMIJU2oY7AaI miKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+0qIHVrEzZFYbvnds0nAVrK5poQCBYzECy5ccGCmx9s=; b=LI0A6v0oYDY1aF8bXPSAMvVUU/5cTe8XmmLBt4SDFJQqwcsyCD8a3iHRYZIzE8uF6Z sJP3gzNbtRkDCAiZ+589TbRn5vTGeSpm+a2Htbx+FCl0S/VIsejU7z3JWD13STWLviKV MIPl/d/E4mlLXY9xLBj4XTltzc69G1U6ZjMjWxK6YOG11I065Hclp07TIxmNZMHEbKk1 Qjh3Lf9Eh+1wlCfmq9NWCAZCU+kloGAmn7O7rIrukFVvWblU+Qxs5uAltXciZde52VuC bhzrPoGN6xvnEhzr6Llb64+iS/pmCkV+PdLXelBW1/Rf9i1Offv6EJOqBL/Oq2wekj1G rAYw== X-Gm-Message-State: ANoB5pmVYEcf2woYGhIQnwwOPO8g9NPMoSAYLBN6pUNmWXRBUwOvr7oJ 9hxr3CM5eA51R4/UclZGGWlwR5/OXTxkaQ5YSurpM5YE04E7QQ== X-Google-Smtp-Source: AA0mqf6rUqHJ91q5onLvTrGOEhpbEQ5LahBfDgLn5zVu7gpDuGGO8yI1hYI/h9D1Hn3sUcMGANYjFABonGUomjRlRNY= X-Received: by 2002:a17:90a:458a:b0:214:166e:e202 with SMTP id v10-20020a17090a458a00b00214166ee202mr17489138pjg.165.1668973521448; Sun, 20 Nov 2022 11:45:21 -0800 (PST) MIME-Version: 1.0 From: "Tan, Qiye" Date: Sun, 20 Nov 2022 14:45:10 -0500 Message-ID: Subject: Where is the definition of some member functions (ex. __gnu_debug::_Safe_iterator_base::_M_detach())? To: libstdc++@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000e2d5de05edec2deb" X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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: --000000000000e2d5de05edec2deb Content-Type: text/plain; charset="UTF-8" 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. Best, Qiye Tan --000000000000e2d5de05edec2deb--