Avoid static_assert in tuple_element for Clang/libc++
Summary: - Clang/libc++ has a static_assert that blows when tuple_element is invoked with a tuple of length 0. Unfortunately if we embed this construct in an enable_if, it still gets evaluated. To work around this, wrap this in a last_element struct and specialize the 0-element case there explicitly. Test Plan: - fbconfig -r folly && fbmake runtests - ./configure && make check on Ubuntu/FC/Mac Reviewed By: andrei.alexandrescu@fb.com FB internal diff: D998591
Showing
Please register or sign in to comment