when i compile my code(maybe old code) using version 3.17.3
some strange error occurred

do someone has suggestions?

proto file: common.proto
*syntax = "proto3";*
*package uc_netmsg;*

*message CSayHelloRspPara {*
*    int64 m_RspTime = 1;*
*}*


#include "common.pb.h"        
uc_netmsg::CSayHelloRspPara stParam;
stParam.set_m_rsptime(0x12345678);


compile error:
*g++ -g -Wall -rdynamic -D_DEBUG_  -D_FILE_OFFSET_BITS=64    -I 
./protobuf/include -std=c++11 -fPIC -c  Msg/GameSvrMsg.cpp*
*In file included from /usr/include/c++/4.8.2/bits/stl_algo.h:66:0,*
*                 from /usr/include/c++/4.8.2/algorithm:62,*
*                 from 
./protobuf/include/google/protobuf/stubs/common.h:38,*
*                 from 
./protobuf/include/google/protobuf/io/coded_stream.h:149,*
*                 from /home/my/common.pb.h:23,*
*                 from Msg/GameSvrMsg.cpp:104:*
*/usr/include/c++/4.8.2/functional:475:12: error: expected ‘)’ before ‘&’ 
token*
*     ref(_Tp& __t) noexcept*
*            ^*
*/usr/include/c++/4.8.2/functional:485:14: error: expected unqualified-id 
before ‘const’*
*     void ref(const _Tp&&) = delete;*
*              ^*
*/usr/include/c++/4.8.2/functional:485:14: error: expected ‘)’ before 
‘const’*
*/usr/include/c++/4.8.2/functional:493:32: error: invalid declarator before 
‘__t’*
*     ref(reference_wrapper<_Tp> __t) noexcept*
*                                ^*
*/usr/include/c++/4.8.2/functional:493:32: error: expected ‘)’ before ‘__t’*
*make: *** [Msg/GameSvrMsg.o] Error 1*
        stParam.SerializeToArray(pcTemp, shMsgParaLength);

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/253fd5c2-6a21-4f6d-9515-5b0eb7ab9cacn%40googlegroups.com.

Reply via email to