码迷,mamicode.com
首页 > 其他好文 > 详细

error C2065: 'TIME_UTC' : undeclared identifier

时间:2014-12-16 22:51:29      阅读:449      评论:0      收藏:0      [点我收藏+]

标签:style   http   ar   io   color   os   sp   for   on   

boost_1_55_0\boost\threadpool\task_adaptors.hpp(138) : error C2065: ‘TIME_UTC‘ : undeclared identifier

boost_1_55_0   version

threadpool-0_2_5   version

解决办法:(This patch fixes compilation)

--- dependencies/threadpool/include/threadpool/task_adaptors.hpp
+++ dependencies/threadpool/include/threadpool/task_adaptors.hpp
@@ -135,7 +135,11 @@
         if(m_break_s > 0 || m_break_ns > 0)
         { // Sleep some time before first execution
           xtime xt;
+#if BOOST_VERSION >= 105000
+          xtime_get(&xt, TIME_UTC_);
+#else
           xtime_get(&xt, TIME_UTC);
+#endif
           xt.nsec += m_break_ns;
           xt.sec += m_break_s;
           thread::sleep(xt); 
@@ -146,7 +150,11 @@
           if(m_break_s > 0 || m_break_ns > 0)
           {
             xtime xt;
+#if BOOST_VERSION >= 105000
+            xtime_get(&xt, TIME_UTC_);
+#else
             xtime_get(&xt, TIME_UTC);
+#endif
             xt.nsec += m_break_ns;
             xt.sec += m_break_s;
             thread::sleep(xt);

参考:https://github.com/vpython/visual/issues/3

error C2065: 'TIME_UTC' : undeclared identifier

标签:style   http   ar   io   color   os   sp   for   on   

原文地址:http://my.oschina.net/mjRao/blog/356829

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!