C++ Logo


Advanced search

Subject: Re: Ideas on debug constexpr functions or other functions that have been 100% removed from the EXE
From: Scott Wardle (swardle_at_[hidden])
Date: 2019-02-13 20:38:24

Hi Matt,

Yeah me writing constexpr is a bit of a lie. What I mean is if the function is gone for some reason like optimization or inlining. Constexpr was just convenient shorthand for any function 100% moved to compile time for some reason. (Marking a function constexpr does not really change this much.). Really the effect of this would be to make optimized inline code easier to debug. I have to do this all of the time at my work.


> On Feb 13, 2019, at 5:47 PM, Matt Bentley <mattreecebentley_at_[hidden]> wrote:
> This could be tricky given that constexpr's aren't compile-time guaranteed, hence there would be a necessary debug mechanism to distinguish between constexpr's which are in fact being compile-time evaluated and those which aren't. Which would be useful anyway, in my opinion. I don't use them so am not sure whether any compiler ash that feature.
> https://stackoverflow.com/questions/14248235/when-does-a-constexpr-function-get-evaluated-at-compile-time
> On 14/02/2019 2:25 p.m., Scott Wardle wrote:
>> Hi Everyone,
>> I was looking through C++ papers and since 2010 (and maybe before) not one iso C++ paper has been submitted on debugging. So maybe now is a good time to think about how we should debug C++ in a new way.
>> To that end I had an idea the other day on debugging and wrote a blog on it and finally posted it. I don’t see how this would effect the standard but it is quality of implementation idea.
>> If we want to constexpr all of the things it would nice if we could printf debug at least. But my idea is maybe we can get the whole debugger to work.
>> Check it out on my blog. http://www.swardle.com/sweb/blog5.html
>> Tell me if you have any feedback (spelling grammar or good counter ideas that shows why the idea is not posable etc...)
>> Scott
>> _______________________________________________
>> SG14 mailing list
>> SG14_at_[hidden]
>> http://lists.isocpp.org/mailman/listinfo.cgi/sg14

SG14 list run by sg14-owner@lists.isocpp.org

Older Archives on Google Groups