Boost logo

Boost Users :

Subject: [Boost-users] [container] Compilation failure with clang 3.1
From: Alexandre Hamez (alexandre.hamez_at_[hidden])
Date: 2012-05-25 04:07:57


Hello,

When compiling Boost.Container, clang 3.1 (stable release, Mac OS X 10.7.4)
fails:
 

> /opt/local/include/boost/container/allocator/allocator_traits.hpp:167:105:
>> error: type name requires a specifier or qualifier
>
> template <typename T> using rebind_alloc =
>> boost::intrusive::detail::type_rebinder<Alloc, T>::type;
>
>
>> ^
>
> /opt/local/include/boost/container/allocator/allocator_traits.hpp:167:59:
>> error: expected ';' after alias declaration
>
> template <typename T> using rebind_alloc =
>> boost::intrusive::detail::type_rebinder<Alloc, T>::type;
>
> ^
>
> ;
>
> /opt/local/include/boost/container/allocator/allocator_traits.hpp:168:72:
>> error: use of undeclared identifier 'rebind_alloc'
>
> template <typename T> using rebind_traits = allocator_traits<
>> rebind_alloc<T> >;
>
> ^
>
> /opt/local/include/boost/container/allocator/allocator_traits.hpp:168:85:
>> error: 'T' does not refer to a value
>
> template <typename T> using rebind_traits = allocator_traits<
>> rebind_alloc<T> >;
>
>
>> ^
>
> /opt/local/include/boost/container/allocator/allocator_traits.hpp:168:29:
>> note: declared here
>
> template <typename T> using rebind_traits = allocator_traits<
>> rebind_alloc<T> >;
>
> ^
>
> /opt/local/include/boost/container/allocator/allocator_traits.hpp:168:87:
>> error: expected ';' after alias declaration
>
> template <typename T> using rebind_traits = allocator_traits<
>> rebind_alloc<T> >;
>
>
However gcc 4.7 has no problem with it. Does anyone has experienced the
same thing and possibly found a workaround?

Thank you!

Alexandre Hamez



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net