Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
9059bd81
Commit
9059bd81
authored
May 01, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test for issue #70
parent
2bc946bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
example/issues.cpp
+10
-0
No files found.
example/issues.cpp
View file @
9059bd81
...
...
@@ -15,6 +15,16 @@ PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>);
void
init_issues
(
py
::
module
&
m
)
{
py
::
module
m2
=
m
.
def_submodule
(
"issues"
);
#if !defined(_MSC_VER)
// Visual Studio 2015 currently cannot compile this test
// (see the comment in type_caster_base::make_copy_constructor)
// #70 compilation issue if operator new is not public
class
NonConstructible
{
private
:
void
*
operator
new
(
size_t
bytes
)
throw
();
};
py
::
class_
<
NonConstructible
>
(
m
,
"Foo"
);
m
.
def
(
"getstmt"
,
[]()
->
NonConstructible
*
{
return
nullptr
;
},
py
::
return_value_policy
::
reference
);
#endif
// #137: const char* isn't handled properly
m2
.
def
(
"print_cchar"
,
[](
const
char
*
string
)
{
std
::
cout
<<
string
<<
std
::
endl
;
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment