cppcms 1.0.4 clang 3.3 编译错误

标签: cppcms
3008人阅读 评论(0) 收藏 举报
分类:

错误信息:

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


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:5162644次
    • 积分:63981
    • 等级:
    • 排名:第29名
    • 原创:1203篇
    • 转载:22篇
    • 译文:1篇
    • 评论:1140条
    文章分类
    最新评论
    算法专家朋友的博客
    清如许的博客