[cfe-dev] Possible recursive template bug in clang 3.3?

Jonathan Sauer jonathan.sauer at gmx.de
Mon Dec 30 01:16:59 PST 2013


> /usr/include/c++/v1/array:295:24: fatal error: recursive template
> instantiation exceeded maximum depth of 256
> I am not sure if this is a clang problem or a libc++ problem. Does
> anyone know what could be going wrong?

While you can increase clang's template recursion depth with "-ftemplate-depth"[*]
(for me -ftemplate-depth=1039 was the lowest that allowed your test to compile), I
think such a huge recursion depth is a quality-of-implementation issue, either with
boost or libc++. As the recursion happens in libc++'s std::__1::__make_tuple_types_imp,
I would suggest you file a bug in libc++'s bug tracker: <http://llvm.org/bugs>.


[*] <http://clang.llvm.org/docs/UsersManual.html#controlling-implementation-limits>

More information about the cfe-dev mailing list