Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 213804 - sys-libs/uclibc++-0.2.2 std::map<>::swap() should be declared as public.
Summary: sys-libs/uclibc++-0.2.2 std::map<>::swap() should be declared as public.
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on: 276246
Blocks: 206863
  Show dependency tree
 
Reported: 2008-03-18 10:08 UTC by Natanael Copa
Modified: 2009-10-13 11:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
associative_base.diff (associative_base.diff,343 bytes, patch)
2008-03-18 10:11 UTC, Natanael Copa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2008-03-18 10:08:58 UTC
Problem is that swap() is declared as private in the base class, associative_base.

Testcase: cat /in/map.cc 
#include <map>
int main(void)
{
	std::map<int, void *> a, b;
	a.swap(b);
}

gives:
# g++-uc map.cc 
map.cc: In function `int main()':
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/associative_base:448: error: `void std::__base_associative<Key, ValueType, Compare, Allocator>::swap(std::__base_associative<Key, ValueType, Compare, Allocator>&) [with Key = int, ValueType = std::pair<int, void*>, Compare = std::less<int>, Allocator = std::allocator<void*>]' is protected
map.cc:5: error: within this context
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/string: At global scope:
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/string:104: warning: inline function `std::basic_string<Ch, Tr, A>::~basic_string() [with Ch = char, Tr = std::char_traits<char>, A = std::allocator<char>]' used but never defined
Comment 1 Natanael Copa 2008-03-18 10:11:36 UTC
Created attachment 146466 [details, diff]
associative_base.diff

i dont know if this is the proper fix. Might be it is possible to redeclare swap as public in the map template/class. I'm not a c++ hacker. 

Patch is sent upstream to uclibc++ maintainer.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2009-10-13 11:15:48 UTC
Removed from tree (see bug 276246).