#2897 introduced:
|
#define _EMIT_STL_ERROR(NUMBER, MESSAGE) \ |
|
_EMIT_STL_MESSAGE("error " #NUMBER ": " MESSAGE) \ |
|
static_assert(false, "Error in C++ Standard Library usage.") |
This emits a #pragma message which is captured in full build logs but not error-only logs, followed by a static_assert which does appear in error-only logs but with a message that doesn't say what's actually wrong.
This has the potential to confuse users who are looking at error-only logs; e.g. in twistedfall/opencv-rust#452 the problem was very simple (Clang version was too old), but the static_assert lost the reason.
For _EMIT_STL_ERROR, I think we should use static_assert alone (with the given NUMBER and MESSAGE); I don't see any reason to use #pragma message here.
#2897 introduced:
STL/stl/inc/yvals_core.h
Lines 512 to 514 in 6c69a73
This emits a
#pragma messagewhich is captured in full build logs but not error-only logs, followed by astatic_assertwhich does appear in error-only logs but with a message that doesn't say what's actually wrong.This has the potential to confuse users who are looking at error-only logs; e.g. in twistedfall/opencv-rust#452 the problem was very simple (Clang version was too old), but the
static_assertlost the reason.For
_EMIT_STL_ERROR, I think we should usestatic_assertalone (with the givenNUMBERandMESSAGE); I don't see any reason to use#pragma messagehere.