https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102045
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Reduced: template<typename T> struct span { template<unsigned long N> constexpr span(T (&a)[N]) : data(a), len(N) { } constexpr bool empty() const { return len == 0; } T* data; unsigned long len; }; struct byte_writer: span<char> { //byte_writer(auto && arg): std::span<char>{arg} { } constexpr void do_something() noexcept { (void)this->empty(); } }; int main() { char array[1]; auto writer = byte_writer{array}; writer.do_something(); }