cppcms 1.0.4 clang 3.3 编译错误

错误信息:

In file included from /usr/src/cppcms-1.0.4/cppcms_boost/cppcms_boost/interprocess/managed_external_buffer.hpp:21:
/usr/src/cppcms-1.0.4/cppcms_boost/cppcms_boost/interprocess/detail/managed_memory_impl.hpp:676:26: error: use 'template' keyword to treat 'get_allocator' as a dependent
      template name
   {   return mp_header->get_allocator<T>(); }
                         ^
/usr/src/cppcms-1.0.4/cppcms_boost/cppcms_boost/interprocess/detail/managed_memory_impl.hpp:691:26: error: use 'template' keyword to treat 'get_deleter' as a dependent template
      name
   {   return mp_header->get_deleter<T>(); }
                         ^
In file included from /usr/src/cppcms-1.0.4/src/cache_storage.cpp:24:
/usr/src/cppcms-1.0.4/private/shmem_allocator.h:122:41: warning: unused parameter 'a' [-Wunused-parameter]
        bool operator!=(shmem_allocator const& a) const
                                               ^
1 warning and 2 errors generated.

Artyom建议直接修改源代码, 比如下面mp_header->template, 这里添加了一个template, 怪怪的语法。

   template<class T>
   typename deleter<T>::type
      get_deleter()
   {   return mp_header->template get_deleter<T>(); }

具体语言的解释参考这里: http://stackoverflow.com/questions/3786360/confusing-template-error


你可能感兴趣的:(cppcms)