220 41387 <511c9222-ae06-222e-4f1b-c4843b5f83fe@gmail.com> article
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: Andrey Semashev <andrey.semashev@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Improving compile times for non-template
 dependent member functions.
Date: Wed, 23 Jan 2019 19:30:21 +0300
Approved: news@gmane.org
Message-ID: <511c9222-ae06-222e-4f1b-c4843b5f83fe@gmail.com>
References: <6a72db2a-932d-4f79-ab68-7c1424e93b9d@isocpp.org>
 <7140056.skhr9ZE8Xc@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
	logging-data="42218"; mail-complaints-to="usenet@blaine.gmane.org"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.0.1
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCXY5TXHWYJRBINNULRAKGQEVUCLQEQ@isocpp.org Wed Jan 23 17:30:27 2019
Return-path: <std-proposals+bncBCXY5TXHWYJRBINNULRAKGQEVUCLQEQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lj1-f198.google.com ([209.85.208.198])
	by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
	(Exim 4.89)
	(envelope-from <std-proposals+bncBCXY5TXHWYJRBINNULRAKGQEVUCLQEQ@isocpp.org>)
	id 1gmLQ3-000AsD-3C
	for gclcip-std-proposals@m.gmane.org; Wed, 23 Jan 2019 17:30:27 +0100
Original-Received: by mail-lj1-f198.google.com with SMTP id t22-v6sf795377lji.14
        for <gclcip-std-proposals@m.gmane.org>; Wed, 23 Jan 2019 08:30:26 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1548261026; cv=pass;
        d=google.com; s=arc-20160816;
        b=alA1uuH+EECBdWC56xJ/CVF1BBR8rT00eojUTEzeTBtHTI7r5Nr5Z9tQ1Zgtic3ahW
         QXbrhykWME7IzJOZjL5N2ri8OPvuhYZFFKtFPFsidklvDtkKhOdWelDyzxjjlYrdf2sP
         L3fqTyYI0K6GWiOb5UYh7wb2i7MfB325pigEhP6jXN2nus1WrLvZ9QmKjd0Qa1gyzDFL
         saauVXqZY4XQ+GMsmvYdC2Fivdm1hAKinhUr2qiKZT4f8Dc71kGvMy1lTMdemJpjDkQX
         T9LUBaTHUUh9xu5z/bRRp7tHeLJhtVVO/i7oseYB0e+JPljN2M1mOXhJr0tZuKa00Osy
         Lqqg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:mime-version:user-agent:date:message-id:from:references
         :to:subject:dkim-signature;
        bh=DX6QqvLkyCZmDht0zgDR2dVpyu40/7wPLLAe+lNEOwg=;
        b=N7oKKlbyx4yt0dIYUWavzSuhxX4eF/LDPj7j7jILKnIwKGeuhwLcc1uulQNs+n6MPN
         EW8l0M4VKPTp3HKaCTvHCt9IXLSwcGK2wh//cKCCYNnozLNoGZnqLMXOeWoW2PxW/j0l
         kngBfwTxKzj7vKB9aBa5iNc9RS2haCQEXmy7oXs751JTi2meRZxHnM6PeM0jgqcGaDhf
         5LJ17U58e7fNYuEOQu/+3Gm549HCO7nPnt4NaTNjSDJaAgBpCwu3qOQBjriygbNo+BrI
         Zk7KBMmzGtF4kGBoG2YLrq6/G9KW6ZotXpXLjegiwU6u13OSrJZ8LmmD+cmzkKyvFdJu
         H25g==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZHIpbxXB;
       spf=pass (google.com: domain of andrey.semashev@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=andrey.semashev@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=DX6QqvLkyCZmDht0zgDR2dVpyu40/7wPLLAe+lNEOwg=;
        b=JYub0xnGw8uzjNED2MLODqGgggoV4W3PvVrZw5IyLvdTDJ3zbNvKXR6JSPqfD02SXp
         Zmh62f/3XuEsHC84/I/HEIrGspaxgK/wNKygpHIUm4WRpx80qF7ZCmyzZanYMxyjnjJm
         lVZ8rH9s9y2dGE0HxawDecQQ36RjgFahdBTKPiv+mDQNeR9xe4T+rx/K30UAr3SUcy8q
         e9nb6AAbL3L0jx7qFDI2jXH//fKpkLIukfm5tBKQ8m9V1HWeaFKZ1YVQ4V8VSnlhSLhU
         rDG7XaMTtzt3SW+53n6NNs9J/4Cl51dyqOU9NHLxP2P/cMZ1XShYI6CCuY74TedZHpgK
         JGAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-language
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=DX6QqvLkyCZmDht0zgDR2dVpyu40/7wPLLAe+lNEOwg=;
        b=r1i4njGXS+HnQTvSG2I9KeS6Zr8VNnkYH6ZvStTWMWKoJvSHL4fvbRB81od8vApjGz
         LGAsfvXX8fnFiQtn/KyJzwWQoDPaKcSb+5QvmDFWCFn8DDormWOY9VozhY/+FRfAhXz4
         S0L4/+1c5TtCmb4iVpWSCBzxrUD0TkHr/df5Eeo5a7BDYU5SHGlK4bdQ4hNS9DjEMhhy
         W0zt4aU1ICaKoHFEiR/EMV6a5605c4UkmcktdS1K6up+orzO81Ovt1R9a+nAfoII/Cc4
         64yyqso4AL/McQbv+t1CMn4ziBY6giK1p131fOuXslFspTaqWKeifgYrHoG2PFSQm7SE
         z 
X-Gm-Message-State: AJcUukeU7865OTMDQ7SvnbL2sfB6NcrZEHavEGFZUcIu4moXaFNdARwM
	mCdEfI870VfJLhpdwmq6TpalWg==
X-Google-Smtp-Source: ALg8bN6WqcFczvnzGP0BT5s//7KYbR77ue4Jm05gqtSX7fCCAmDJZtP3O6TVEd8M8ZrhlbynesbjtQ==
X-Received: by 2002:a2e:574f:: with SMTP id r15-v6mr287886ljd.19.1548261025973;
        Wed, 23 Jan 2019 08:30:25 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:ac2:4424:: with SMTP id w4ls302128lfl.13.gmail; Wed, 23 Jan
 2019 08:30:24 -0800 (PST)
X-Received: by 2002:a19:3809:: with SMTP id f9mr2414572lfa.148.1548261023999;
        Wed, 23 Jan 2019 08:30:23 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1548261023; cv=none;
        d=google.com; s=arc-20160816;
        b=d/rFDOBKsGgB5+kBZpSZfgrM8zAaTDj6ToqhCgQEob8UbITXzOw0pNjE1Xw0nrzsp6
         2GF7ZUgBdsm9e1irhAbpenBOWGZNrXlN+4Qh6kDpqw2HU4ghtMTl/bmBB++1KrpD/D2q
         YKDBlbj9PH4pMKgLhQarygU6lecfhDYahuhwJrPoYAv7MjPuuJk0PO8M9QzgracpEQBz
         vutW47/dM2+BSS1y+uI6783AD01YYDCulfBoQfMcqhaaquIZBGwuPphPhg/+pjN+Ln+b
         HQnT6GC7vj8clr2WBVoJ/La4oIxTAF0yP/6WWLDsaBRwcW90bMAaTP8bz4dc4nKO8ps1
         OAJA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:content-language:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:to:subject
         :dkim-signature;
        bh=z4pQWbM/K1TtUB73jQQUEzMjZ7mis+sZO3FXvL3IBqo=;
        b=vgZ+F3xhnSqam/w4w2Px7/j4aLw7/yXw1lemTXGlRQ9C49/LyCF8IysBZbITNl00V/
         lcyo3NI146q8eUwHLfAYANHwY48kAqIksk5swDnbk46uWSWjD33d03Rq6GHOFcGNCZrJ
         fUzQdFLQdoMxu4CZgaAhrtfO+S5Yv4wQyXhLyo8SYaQdrutTgSS/ggkhPuf+6MpoxXVO
         uPUqr8/+ZY3YPKOc7O6N3R5qPPDZt2Gvm+9a606wZIYzzAPKExlso76gnUioCjHU7WM0
         bJGE9fkkbRe0SGrsGQk6EDxuMAEXEYQpRKVICvmQdjBSrZYIbE+XryuaCDe3ZM1B1mff
         SJmA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZHIpbxXB;
       spf=pass (google.com: domain of andrey.semashev@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=andrey.semashev@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id z22-v6sor2714681ljb.22.2019.01.23.08.30.23
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Wed, 23 Jan 2019 08:30:23 -0800 (PST)
Received-SPF: pass (google.com: domain of andrey.semashev@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a2e:681a:: with SMTP id c26-v6mr2537545lja.175.1548261023355;
        Wed, 23 Jan 2019 08:30:23 -0800 (PST)
Original-Received: from [192.168.1.2] (broadband-37-110-31-10.ip.moscow.rt.ru. [37.110.31.10])
        by smtp.googlemail.com with ESMTPSA id m15sm405868lfj.92.2019.01.23.08.30.21
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 23 Jan 2019 08:30:22 -0800 (PST)
In-Reply-To: <7140056.skhr9ZE8Xc@tjmaciei-mobl1>
Content-Language: ru
X-Original-Sender: andrey.semashev@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=ZHIpbxXB;       spf=pass
 (google.com: domain of andrey.semashev@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=andrey.semashev@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:41387
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41387>

On 1/23/19 7:20 PM, Thiago Macieira wrote:
> On Wednesday, 23 January 2019 07:58:54 PST p groarke wrote:
>> template <class T>
>> struct test {
>>      int val() const;
>>
>> private:
>>      int val_ { 42 };
>>      T t;
>> };
> 
> Explain how, given the above, the compiler can decide whether test::val()
> depends on T or not.
> 
> Remember: this is all the compiler sees when compiling other translation units
> that include this header.

It doesn't need to know that. When val() is ODR-used, the compiler will 
simply leave a reference to the val symbol to be resolved by the linker.

The question is really whether the compiler that sees the implementation 
of val() should emit its compiled body. Currently it doesn't, presumably 
due to the reason I described in my reply.

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/511c9222-ae06-222e-4f1b-c4843b5f83fe%40gmail.com.

.
