https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100065
Bug ID: 100065 Summary: Conditional explicit doesn't work for deduction guide Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: andrey.davydov at jetbrains dot com Target Milestone: --- #include <type_traits> template<bool b> struct X { template<typename T> X(T); }; template<bool b> explicit(b) X(std::bool_constant<b>) -> X<b>; X false_ = std::false_type{}; // #1 should be OK X true_ = std::true_type{}; // #2 should fail, but GCC compiles it Note that other compilers (Clang, MSVC) rejects case #2: https://gcc.godbolt.org/z/fPEKn1no9