https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72745
Bug ID: 72745 Summary: Please static assert in std::get to check out of range Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: markus.ilmola at pp dot inet.fi Target Milestone: --- Currently using an out of range tuple index with std::get will result in long and confusing error message like: "error: invalid use of incomplete type 'class std::tuple_element<0ul, std::tuple<> >'" See: http://melpon.org/wandbox/permlink/q7L1cdFrdPQ8R3Bk It would be easy to add a one line static assert to check the index to get a better error message such as: "error: tuple index out of range"