|
Boost : |
From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2024-02-24 01:08:18
On Fri, Feb 23, 2024 at 2:05â¯AM Andrzej Krzemienski <akrzemi1_at_[hidden]> wrote:
>
[snip]
> It should be noted that excessively huge compiler errors from compiling any template library always stem from the fact that the compiler is giving you all the potential useful information: "All the useful information is there: you just need to scroll through the screenfuls of text to find it".
>
> The problem is that there is too much potentially useful information. When I get four screens of illegible signatures, and then the fifth screen gives me concept constraints that failed, but I do not know for which type, because of illegible type signatures, I do not appreciate it.
>
> Instead, I would appreciate a two-step debugging of an error message:
> In the first step, I get a short error message that type T violated concept C. At this point I do not know why C<T> is false.
> In the next step, I will remove the offending function call and replace it with a "test function" whose only goal is to test if a given type satisfies a given concept.
> And then I will get another reasonably short message saying which constraint is violated.
It is my fervent hope that concept-related diagnostics get better in
the coming years. However, I think even now, when they suck so hard,
I'd rather have the info there to dig through than have to stop and
write some code just to dig through a subset of it there.
Zach
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk