FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/include/boost/python/converter/pointer_type_id.hpp at develop · auserj/python · GitHub
auserj
/
python
Public
forked from
boostorg/python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
include
/
boost
/
python
/
converter
/
pointer_type_id.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
68 lines (58 loc) · 1.63 KB
Breadcrumbs
python
/
include
/
boost
/
python
/
converter
/
pointer_type_id.hpp
Copy path
File metadata and controls
68 lines (58 loc) · 1.63 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
Copyright David Abrahams 2002.
//
Distributed under the Boost Software License, Version 1.0. (See
//
accompanying file LICENSE_1_0.txt or copy at
//
http://www.boost.org/LICENSE_1_0.txt)
#
ifndef
POINTER_TYPE_ID_DWA2002222_HPP
#
define
POINTER_TYPE_ID_DWA2002222_HPP
#
include
<
boost/python/type_id.hpp
>
#
include
<
boost/python/detail/type_traits.hpp
>
namespace
boost
{
namespace
python
{
namespace
converter
{
namespace
detail
{
template
<
bool
is_ref =
false
>
struct
pointer_typeid_select
{
template
<
class
T
>
static
inline
type_info
execute
(T*(*)() = 0)
{
return
type_id<T>();
}
};
template
<>
struct
pointer_typeid_select
<
true
>
{
template
<
class
T
>
static
inline
type_info
execute
(T*
const
volatile
&(*)() = 0)
{
return
type_id<T>();
}
template
<
class
T
>
static
inline
type_info
execute
(T*
volatile
&(*)() = 0)
{
return
type_id<T>();
}
template
<
class
T
>
static
inline
type_info
execute
(T*
const
&(*)() = 0)
{
return
type_id<T>();
}
template
<
class
T
>
static
inline
type_info
execute
(T*&(*)() = 0)
{
return
type_id<T>();
}
};
}
//
Usage: pointer_type_id<T>()
//
//
Returns a type_info associated with the type pointed
//
to by T, which may be a pointer or a reference to a pointer.
template
<
class
T
>
type_info
pointer_type_id
(T(*)() = 0)
{
return
detail::pointer_typeid_select<
boost::python::detail::is_lvalue_reference<T>::value
>::
execute
((
T
(*)())
0
);
}
}}}
//
namespace boost::python::converter
#
endif
//
POINTER_TYPE_ID_DWA2002222_HPP
Back
|
FazBrowse Home
|
New Git URL