
Why are these three outputs equivalent and what syntax is this?
>Solution :
Because std::is_base_of (and many other traits) "returns" std::true_type or std::false_type which are template instances of std::integer_constant<T, value>.
A variable instance of type std::integer_constant<T, value> (which is constructed with {}) is implicitly convertible to T and its compile-time value returned by the conversion.
constexpr bool flag = std::is_base_of<B, D>{};
I used to have this notation std::is_base_of<Base, Derived>{} to evaluate it in conditions to save typing, but this can be confusing, and there is no reason for this since one can use std::is_base_of_v<B, D> nowadays.