https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96848
Bug ID: 96848 Summary: Inherited conditionally explicit constructors via using declaration do not enforce explicitness if dependent on template parameter Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: northon_patrick3 at yahoo dot ca Target Milestone: --- Example: https://godbolt.org/z/4x9r7e ```cpp #include <iostream> #include <type_traits> struct E {}; struct F {}; struct G {}; template <typename From_, typename To_> constexpr bool isValidImplicitConvert = false; template <> constexpr bool isValidImplicitConvert<E, G> = true; template <typename T_> struct A { template <typename OT_> explicit(!isValidImplicitConvert<OT_, T_>) constexpr A(const OT_ &) {} //explicit(isValidImplicitConvert<E, T_>) constexpr A(E) {} //explicit(isValidImplicitConvert<F, T_>) constexpr A(F) {} }; template <typename T_> struct B : public A<T_> { using A<T_>::A; }; int main(int, char **) { std::cout << std::is_convertible_v<E, A<G>> << '\n'; std::cout << std::is_convertible_v<F, A<G>> << '\n'; std::cout << std::is_convertible_v<E, B<G>> << '\n'; std::cout << std::is_convertible_v<F, B<G>> << '\n'; return 0; } ``` Output: ``` 1 0 1 1 ``` Expected output: ``` 1 0 1 0 ``` When inheriting constructors from a base class via a using declaration, if said constructors are conditionally explicit and the condition is dependent on a deduced template parameter, the explicit state is ignored. Clang give the expected output, however I am not sure who is correct.