Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
545fe6c9
Commit
545fe6c9
authored
Apr 08, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed another compiler error that could happen with the forwarding constructor.
parent
c5af788e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
core.h
dlib/dnn/core.h
+8
-4
No files found.
dlib/dnn/core.h
View file @
545fe6c9
...
...
@@ -590,20 +590,24 @@ namespace dlib
}
template
<
typename
T
,
typename
...
U
>
struct
d
etails_constructable_from
struct
d
isable_forwarding_constr
{
const
static
bool
value
=
std
::
is_constructible
<
LAYER_DETAILS
,
T
>::
value
;
};
template
<
typename
...
T
,
typename
...
U
>
struct
details_constructable_from
<
std
::
tuple
<
T
...
>
,
U
...
>
struct
disable_forwarding_constr
<
std
::
tuple
<
T
...
>
,
U
...
>
{
const
static
bool
value
=
true
;
};
template
<
typename
...
T
>
struct
disable_forwarding_constr
<
add_layer
<
T
...
>>
{
// just say true so that the constructor below never activates for tuple types.
const
static
bool
value
=
true
;
};
template
<
typename
...
T
,
typename
=
typename
std
::
enable_if
<!
d
etails_constructable_from
<
T
...
>::
value
>::
type
typename
=
typename
std
::
enable_if
<!
d
isable_forwarding_constr
<
typename
std
::
remove_reference
<
T
>::
type
...
>::
value
>::
type
>
add_layer
(
T
&&
...
args
...
...
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