When a static_assert
appears to fire, the compiler tries to be helpful, error messages usually But this looks like example: / foo.hh: 35: 77: Required from '...' example / foo.hh: 27: 54: '...' example / foo.hh: 42: 25 : '...' Required from example / foo.hh: 84: 94: Required '...' from ... example / foo.hh: 27: 54: '...' Example / foo.hh: 92 : 14 Required: Here are examples / foo.hh: 12: 36: Error: Fixed claim failure: My error message
The problem is that my In the case, everything except the first and the last message is not much and prevents the error message from being really helpful. In practice, immediate reference information can be very long (both references and number of references).
Is there a way to stop the compiler from removing all the immediate references (tricks, even hacks) for a specific static_assert
? I am mostly interested in GCC and clang output.
No comments:
Post a Comment