Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
545fe6c9
Commit
545fe6c9
authored
Apr 08, 2016
by
Davis King
Browse files
Fixed another compiler error that could happen with the forwarding constructor.
parent
c5af788e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
dlib/dnn/core.h
dlib/dnn/core.h
+8
-4
No files found.
dlib/dnn/core.h
View file @
545fe6c9
...
@@ -590,20 +590,24 @@ namespace dlib
...
@@ -590,20 +590,24 @@ namespace dlib
}
}
template
<
typename
T
,
typename
...
U
>
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
;
const
static
bool
value
=
std
::
is_constructible
<
LAYER_DETAILS
,
T
>::
value
;
};
};
template
<
typename
...
T
,
typename
...
U
>
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
;
const
static
bool
value
=
true
;
};
};
template
<
template
<
typename
...
T
,
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
(
add_layer
(
T
&&
...
args
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