Skip to content

Commit 8653705

Browse files
committed
declaration_xxx_traits.get_declaration now removes pointer types
This makes sure that when declarations.is_noncopyable is called on a pointer_t, the is_noncopyable does not fail and correctly extracts the class declaration using get_declaration.
1 parent d3780a9 commit 8653705

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pygccxml/declarations/type_traits_classes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class declaration_xxx_traits(object):
5656
- get reference to the declaration
5757
"""
5858
sequence = [
59+
type_traits.remove_pointer,
5960
type_traits.remove_alias,
6061
type_traits.remove_cv,
6162
type_traits.remove_declarated]

unittests/data/type_traits.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ namespace yes{
191191
typedef detail::g_t g_t;
192192
typedef detail::const_container const_container_t;
193193
typedef detail::const_item const_item_t;
194+
typedef detail::const_item *const_item_t_ptr;
194195

195196
}
196197
namespace no{
@@ -200,6 +201,7 @@ namespace no{
200201
typedef std::set< std::string > string_set_type;
201202
typedef std::multimap< std::string, std::string > s2s_multimap_type;
202203
typedef detail::vertex vertex_type;
204+
typedef detail::vertex *vertex_type_ptr;
203205
}
204206
}
205207

0 commit comments

Comments
 (0)