From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by sourceware.org (Postfix) with ESMTPS id 7BC363858D32 for ; Sun, 20 Nov 2022 20:16:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7BC363858D32 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-wm1-x32b.google.com with SMTP id c65-20020a1c3544000000b003cfffd00fc0so7419459wma.1 for ; Sun, 20 Nov 2022 12:16:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=1LMRNqG5/61wLkJGqRC7RW6aCq7CJUSTl3gexlVGAqI=; b=eTI3WYjtoLmVhg+pALQfsFJRDUWCN3w18mnNfoFtGCmUtvHJTmZ7Y7JuL4VIXvhEoe eTqUpJdR8KiDrKufHDqVgOzooAHy+JpqTrHOm+fRlQXIT3Kr4ZUd1inOBemNVxVpQQCl PCzsoBPi73kWIp7KB2uXOqdNUX5N5gHJCr6Lp9pOJCaQG11vOfFU8aVDGnMTjogCDkuy ORsC779HvEM7np2htoZyR/kxjOg3L0KNtTTs0ch7i3jloCdgnkxoXvmLIa9hzXx84zDN ivgctOTkunFAV0eVL0jnYkI3hzCq0zDH+u7JSDZv68sbE5LgUfNB5RaflO2BVjbUkg9E 0avw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1LMRNqG5/61wLkJGqRC7RW6aCq7CJUSTl3gexlVGAqI=; b=17/6FS5a9mVfS8exoru6tyB5wiuKF3n6fgbNrPioIbdTuepw64A69Txi4gnJMrzfF8 qioQ5oB28ra6Yx/cPfDrravIpo/UXVwiju2Zw+iaTc9ZgLOG8NkL1XmhavZ7xsWPHm2s Egb2VZkXY89hQgXEFz3AzZdvkpCSyT6llbKluguJeejVm+a3itlhCQTkrLm0+ESO/UIh nZu5om5wbA+iIO34V2coOps4t5+a98AQ2td7nvKnqJd4Ev/MLLy1ysu+RdQ56IsSYVdz QXWu+ClxMQjpPUWix9e3Q7jsqeVpyT4lnofUq0tkzcqwBF15+l9fVc+hQ4+0UyWCDwhj UiKw== X-Gm-Message-State: ANoB5pn/j+c8khaYba6SqfOF9PB7VGvmHL69gamieYi6qOZalfg77R/S s/yR/Zw2B5MQrzXHsGH87TH6rPVZW0k= X-Google-Smtp-Source: AA0mqf7xvdbsoNXBH+8SrH5lOIFaEgseCgwqIG2fNqskC091UG0LNjCB4QNG40SMTdy+dpVVAGo+8w== X-Received: by 2002:a7b:c048:0:b0:3a8:3e58:bb9b with SMTP id u8-20020a7bc048000000b003a83e58bb9bmr361088wmc.168.1668975377780; Sun, 20 Nov 2022 12:16:17 -0800 (PST) Received: from ?IPV6:2a01:e0a:1dc:b1c0:5e76:d3a5:726f:e6da? ([2a01:e0a:1dc:b1c0:5e76:d3a5:726f:e6da]) by smtp.googlemail.com with ESMTPSA id i7-20020a05600c354700b003cf4eac8e80sm15112093wmq.23.2022.11.20.12.16.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Nov 2022 12:16:17 -0800 (PST) Message-ID: <40bb4393-148b-81df-ede2-786a7598b066@gmail.com> Date: Sun, 20 Nov 2022 21:16:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Where is the definition of some member functions (ex. __gnu_debug::_Safe_iterator_base::_M_detach())? To: libstdc++@gcc.gnu.org References: Content-Language: fr From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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: On 20/11/22 20: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. Good exercice ! > 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. This is in the .so, all exports are done from the src folder. For _GLIBCXX_DEBUG mode all implementation is in src/c++11/debug.cc. François