Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > gcc 4.8: expression list treated as compound expression in mem-initializer

Reply
Thread Tools

gcc 4.8: expression list treated as compound expression in mem-initializer

 
 
woodbrian77@gmail.com
Guest
Posts: n/a
 
      03-14-2013
How to fix this?

g++ -o receivesample -std=c++0x -O3 -s -W -Wall -I. -I /usr/local/include-DMAKEFILES receivesample.cc MsgHelper.cg.o /usr/local/lib/libhome.a
In file included from /usr/local/include/c++/4.8.0/set:60:0,
from receivesample.cc:13:
/usr/local/include/c++/4.8.0/bits/stl_tree.h: In instantiation of 'std::_Rb_tree_node<_Val>::_Rb_tree_node(_Args&& ...) [with _Args = {std::_Rb_tree_const_iterator<unsigned int>&, unsigned int}; _Val = unsigned int]':
/usr/local/include/c++/4.8.0/ext/new_allocator.h:120:4: required from 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::_Rb_tree_node<unsigned int>; _Args = {std::_Rb_tree_const_iterator<unsigned int>&, unsigned int}; _Tp = std::_Rb_tree_node<unsigned int>]'
/usr/local/include/c++/4.8.0/bits/stl_tree.h:403:8: required from 'std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {std::_Rb_tree_const_iterator<unsigned int>&, unsigned int}; _Key = unsigned int; _Val = unsigned int; _KeyOfValue = std::_Identity<unsigned int>; _Compare = std::less<unsigned int>; _Alloc = std::allocator<unsigned int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<unsigned int>*]'
/usr/local/include/c++/4.8.0/bits/stl_tree.h:1615:64: required from 'std:air<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_unique(_Args&& ...) [with _Args = {std::_Rb_tree_const_iterator<unsigned int>&, unsigned int}; _Key = unsignedint; _Val = unsigned int; _KeyOfValue = std::_Identity<unsigned int>; _Compare = std::less<unsigned int>; _Alloc = std::allocator<unsigned int>]'
/usr/local/include/c++/4.8.0/bits/stl_set.h:414:64: required from 'std:air<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename _Alloc::rebind<_Key>:ther>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::emplace(_Args&& ...) [with _Args = {std::_Rb_tree_const_iterator<unsigned int>&, unsigned int}; _Key = unsigned int; _Compare = std::less<unsigned int>; _Alloc = std::allocator<unsigned int>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename _Alloc::rebind<_Key>:ther>::const_iterator = std::_Rb_tree_const_iterator<unsigned int>]'
../MsgHelper.cg.hh:56:5: required from 'void MsgHelper::Receive(cmw::ReceiveBuffer<R>&, std::set<unsigned int>&) [with R = SameFormat]'
receivesample.cc:53:39: required from here
/usr/local/include/c++/4.8.0/bits/stl_tree.h:137:49: error: expression listtreated as compound expression in mem-initializer [-fpermissive]
_M_value_field(std::forward<_Args>(__args)...) { }
^


template <class R>
void
Receive (::cmw::ReceiveBuffer<R>& buf
,::std::set<uint32_t>& az1
)
{
uint32_t count[1];
count[0]=buf.template Give<uint32_t>();
auto endIt1=az1.end();
for(;count[0]>0;--count[0]){
az1.emplace(endIt1, buf.template Give<uint32_t>());
}
}

I believe it doesn't like the emplace call.

That function is called from this program
http://webEbenezer.net/misc/samples/receivesample.cc
..

I've built and installed the March 10, 2013 version of
gcc 4.8. I've built and run several programs with it,
but then ran into this. Tia.


Brian
Ebenezer Enterprises - in G-d we trust.
http://webEbenezer.net
 
Reply With Quote
 
 
 
 
woodbrian77@gmail.com
Guest
Posts: n/a
 
      03-14-2013
On Thursday, March 14, 2013 5:51:17 PM UTC, (E-Mail Removed) wrote:
> How to fix this?
>


My error ... need to use emplace_hint.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
static data-member treated as extern Scott J. McCaughrin C++ 2 11-09-2004 09:49 AM
How to get child controls not be treated as properties ? Dmitriy Zakharov ASP .Net 2 07-30-2004 08:41 PM
Spose we'll be treated Steve Young Digital Photography 1 02-01-2004 06:04 PM
Commented Code Not Treated As Commented Code Jim Heavey ASP .Net 1 12-02-2003 02:25 PM
Problem selecting a node with XPATH if attribute value contains backslashes - how to force XPATH string to be treated as literal? Alastair Cameron XML 1 07-08-2003 07:24 PM



Advertisments