Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++type traits librarySingle-choice MCQ

What is the value of `std::is_convertible_v<B, A>` and `std::is_base_of_v<A, B>` for these private-inheritance classes?

#include <type_traits> struct A {}; struct B : private A {}; constexpr bool c = std::is_convertible_v<B*, A*>; constexpr bool d = std::is_base_of_v<A, B>;