C++ Logo

sg15

Advanced search

Re: [SG15] [isocpp-modules] Determining identity like #pragma once

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Wed, 10 Jul 2019 07:23:06 +0000
Right. Whether it should be an error is something that needs to be discussed as part of file identity resolution.

To remove any suspense, my opinion is that file identity is problematic and I would prefer content-based identification - that is what the time-honored include guard technique does. It leads to less gotchas and is “well-debugged” :-)

— Gaby

On Jul 9, 2019, at 7:04 PM, Rene Rivera <grafikrobot_at_[hidden]<mailto:grafikrobot_at_[hidden]>> wrote:

On Tue, Jul 9, 2019 at 7:48 PM Gabriel Dos Reis via SG15 <sg15_at_[hidden]<mailto:sg15_at_[hidden]>> wrote:
I agree.

Also, we should note that import and #include of the same file can lead to unexpected results, so we need both clarifications and recommendations there for users.

If it's unexpected why not make it an error?

--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Frobot-dreams.net%2F&data=02%7C01%7Cgdr%40microsoft.com%7C59d893c69af146d0607f08d704dae505%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636983210503984092&sdata=9UbdFOGl5%2FN6ve30foildZeV2pkcrrKHXjG4Qqj0ODg%3D&reserved=0>

_______________________________________________
Modules mailing list
Modules_at_[hidden]<mailto:Modules_at_[hidden]>
Subscription: https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fmodules&amp;data=02%7C01%7Cgdr%40microsoft.com%7C59d893c69af146d0607f08d704dae505%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636983210504014082&amp;sdata=CidPo3ApsrhwUDvf7j8TeKZrp1HoNwNHHqHIDWnliEo%3D&amp;reserved=0
Link to this post: https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmodules%2F2019%2F07%2F0476.php&amp;data=02%7C01%7Cgdr%40microsoft.com%7C59d893c69af146d0607f08d704dae505%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636983210504014082&amp;sdata=HhgXFbetWEJ4ycioLRrxnWkHsMKajiozBx%2Fojw4uUuc%3D&amp;reserved=0

Received on 2019-07-10 02:25:01