static_assert(!std::is_constructible<B&, const D&>::value, "Error");
static_assert(!std::is_constructible<B&&, const D&&>::value, "Error");
+#if __cpp_aggregate_bases && __cpp_aggregate_paren_init
+// In C++20 an rvalue reference or const lvalue reference can bind to a
+// temporary of aggregate type that is initialized from a base class value.
+constexpr bool v = true;
+#else
+constexpr bool v = false;
+#endif
+
static_assert(!std::is_constructible<D&, B&>::value, "Error");
-static_assert(!std::is_constructible<D&&, B&&>::value, "Error");
+static_assert(v == std::is_constructible<D&&, B&&>::value, "Error");
static_assert(!std::is_constructible<D&, const B&>::value, "Error");
-static_assert(!std::is_constructible<D&&, const B&&>::value, "Error");
-static_assert(!std::is_constructible<const D&, B&>::value, "Error");
-static_assert(!std::is_constructible<const D&&, B&&>::value, "Error");
+static_assert(v == std::is_constructible<D&&, const B&&>::value, "Error");
+static_assert(v == std::is_constructible<const D&, B&>::value, "Error");
+static_assert(v == std::is_constructible<const D&&, B&&>::value, "Error");
static_assert(!std::is_constructible<B&&, B&>::value, "Error");
static_assert(!std::is_constructible<B&&, D&>::value, "Error");
std::initializer_list<B>&>, std::initializer_list<int>,
std::initializer_list<B>>::value, "Error");
+#if __cpp_aggregate_paren_init
+// In C++20 arrays can be initialized using parentheses.
+constexpr bool w = true;
+#else
+constexpr bool w = false;
+#endif
+
static_assert(!std::is_constructible<FromArgs<std::initializer_list<int>>,
int, int>::value, "Error");
static_assert(!std::is_constructible<const
FromArgs<std::initializer_list<int>>, int, int>::value, "Error");
-static_assert(!std::is_constructible<B[2], B, B>::value, "Error");
-static_assert(!std::is_constructible<const B[2], B, B>::value, "Error");
-static_assert(!std::is_constructible<U[2], U, U>::value, "Error");
-static_assert(!std::is_constructible<const U[2], U, U>::value, "Error");
+static_assert(w == std::is_constructible<B[2], B, B>::value, "Error");
+static_assert(w == std::is_constructible<const B[2], B, B>::value, "Error");
+static_assert(w == std::is_constructible<U[2], U, U>::value, "Error");
+static_assert(w == std::is_constructible<const U[2], U, U>::value, "Error");
static_assert(!std::is_constructible<E, E, E>::value, "Error");
static_assert(!std::is_constructible<const E, E, E>::value, "Error");