stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (STDCXX-152) error instantiating std::map on an incomplete type
Date Tue, 24 Jun 2008 11:04:45 GMT

     [ https://issues.apache.org/jira/browse/STDCXX-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Farid Zaripov updated STDCXX-152:
---------------------------------

       Patch Info: [Patch Available]
    Fix Version/s:     (was: 4.3)
                   4.2.2

With proposed patch this can be fixed in 4.2.2 release.

	ChangeLog:
	* include/rw/_tree.h (__rb_tree): Rewrite typedefs to allow instantiate
	map and set containers on incomplete type.

{noformat}
Index: include/rw/_tree.h
===================================================================
--- include/rw/_tree.h	(revision 671074)
+++ include/rw/_tree.h	(working copy)
@@ -261,9 +261,9 @@
     
     typedef __rw_rb_tree_node<_Alloc,_Val,_Key,_KeyOf> _C_node_t; 
     typedef _RWSTD_ALLOC_TYPE (_Alloc,_Val)            _C_val_alloc_t;
-    typedef _TYPENAME _C_node_t::_C_key_alloc_t        _C_key_alloc_t;
-    typedef _TYPENAME _C_node_t::_C_node_alloc_t       _C_node_alloc_t;
-    typedef _TYPENAME _C_node_t::_C_link_t             _C_link_t;
+    typedef _RWSTD_REBIND (_Alloc, _Key)               _C_key_alloc_t;
+    typedef _RWSTD_REBIND (_Alloc, _C_node_t)          _C_node_alloc_t;
+    typedef _TYPENAME _C_node_alloc_t::pointer         _C_link_t;
 
 public:
     
{noformat}

> error instantiating std::map on an incomplete type
> --------------------------------------------------
>
>                 Key: STDCXX-152
>                 URL: https://issues.apache.org/jira/browse/STDCXX-152
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 23. Containers
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
>         Environment: all
>            Reporter: Martin Sebor
>            Assignee: Travis Vitek
>            Priority: Critical
>             Fix For: 4.2.2
>
>   Original Estimate: 16h
>  Remaining Estimate: 16h
>
> From http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-user/200602.mbox/%3c20060215231134.6717.qmail@web82211.mail.mud.yahoo.com%3e:
>   I am trying to use Boost built using stdcxx on Solaris. I was able to build the date_time
> library but when I try to compile a test program I end up with errors related to incomplete
> types. I have narrowed the issue to the following code
>    
>   #include <map>
> #include <string>
>   using namespace std;
>   template <class T>
> struct C {
>      typedef multimap<T,C> maps;
>      typedef typename maps::value_type value_type;
> };
>    
>   int main () {
>   C<std::string> c;
> }
>   When I compile using the default Sun CC libraries or rwtools7_std or stlport4, the
code
> compiles fine. But when I compile using stdcxx, I end up with the following errors.
>    
>   "/opt/idev3/dbapatla/apache-stdcxx-4.1.3/include/rw/_pair.h", line 55: Error: In this
declaration
> "second" is of an incomplete type "C<std::string>".
> "/opt/idev3/dbapatla/apache-stdcxx-4.1.3/include/rw/_tree.h", line 86:     Where: While
specializing
> "std::pair<const std::string, C<std::string>>".
> "/opt/idev3/dbapatla/apache-stdcxx-4.1.3/include/rw/_tree.h", line 86:     Where: Specialized
> in __rw::__rw_rb_tree_node<std::allocator<std::pair<const std::string, C<std::string>>>,
> std::pair<const std::string, C<std::string>>, std::string, __rw::__select1st<std::pair<const
> std::string, C<std::string>>, std::string>>.
> "/opt/idev3/dbapatla/apache-stdcxx-4.1.3/include/rw/_tree.h", line 259:     Where: Specialized
> in __rw::__rb_tree<std::string, std::pair<const std::string, C<std::string>>,
> __rw::__select1st<std::pair<const std::string, C<std::string>>, std::string>,
> std::less<std::string>, std::allocator<std::pair<const std::string, C<std::string>>>>.
> "/opt/idev3/dbapatla/apache-stdcxx-4.1.3/include/map", line 323:     Where: Specialized
in
> std::multimap<std::string, C<std::string>, std::less<std::string>, std::allocator<std::pair<const
> std::string, C<std::string>>>>.
> "test2.cpp", line 9:     Where: Specialized in C<std::string>.
> "test2.cpp", line 13:     Where: Specialized in non-template code.
> 1 Error(s) detected.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message