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
ca60cf8a
Commit
ca60cf8a
authored
May 13, 2017
by
elelel
Committed by
Davis E. King
May 13, 2017
Browse files
Change type traits from inherited to explicit (#591)
parent
a1c3b067
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
dlib/geometry/vector.h
dlib/geometry/vector.h
+8
-2
No files found.
dlib/geometry/vector.h
View file @
ca60cf8a
...
...
@@ -1284,8 +1284,11 @@ namespace std
Define std::less<vector<T,3> > so that you can use vectors in the associative containers.
!*/
template
<
typename
T
>
struct
less
<
dlib
::
vector
<
T
,
3
>
>
:
public
binary_function
<
dlib
::
vector
<
T
,
3
>
,
dlib
::
vector
<
T
,
3
>
,
bool
>
struct
less
<
dlib
::
vector
<
T
,
3
>
>
{
typedef
dlib
::
vector
<
T
,
3
>
first_argument_type
;
typedef
dlib
::
vector
<
T
,
3
>
second_argument_type
;
typedef
bool
result_type
;
inline
bool
operator
()
(
const
dlib
::
vector
<
T
,
3
>
&
a
,
const
dlib
::
vector
<
T
,
3
>
&
b
)
const
{
if
(
a
.
x
()
<
b
.
x
())
return
true
;
...
...
@@ -1302,8 +1305,11 @@ namespace std
Define std::less<vector<T,2> > so that you can use vector<T,2>s in the associative containers.
!*/
template
<
typename
T
>
struct
less
<
dlib
::
vector
<
T
,
2
>
>
:
public
binary_function
<
dlib
::
vector
<
T
,
2
>
,
dlib
::
vector
<
T
,
2
>
,
bool
>
struct
less
<
dlib
::
vector
<
T
,
2
>
>
{
typedef
dlib
::
vector
<
T
,
2
>
first_argument_type
;
typedef
dlib
::
vector
<
T
,
2
>
second_argument_type
;
typedef
bool
result_type
;
inline
bool
operator
()
(
const
dlib
::
vector
<
T
,
2
>
&
a
,
const
dlib
::
vector
<
T
,
2
>
&
b
)
const
{
if
(
a
.
x
()
<
b
.
x
())
return
true
;
...
...
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