Possible recursive template bug in clang 3.3?

Hello:

The attached application fails to compile on the following platform:
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610

but it works fine on gcc 4.8. I am using Boost 1.55.0. The error is as
follows:

/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?

Thank you.

test.cpp (428 Bytes)

Hello,

/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>.

Jonathan

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