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
31f02b00
Commit
31f02b00
authored
May 14, 2017
by
Davis King
Browse files
merged
parents
77b051be
ca60cf8a
Changes
1
Hide 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 @
31f02b00
...
@@ -1284,8 +1284,11 @@ namespace std
...
@@ -1284,8 +1284,11 @@ namespace std
Define std::less<vector<T,3> > so that you can use vectors in the associative containers.
Define std::less<vector<T,3> > so that you can use vectors in the associative containers.
!*/
!*/
template
<
typename
T
>
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
inline
bool
operator
()
(
const
dlib
::
vector
<
T
,
3
>
&
a
,
const
dlib
::
vector
<
T
,
3
>
&
b
)
const
{
{
if
(
a
.
x
()
<
b
.
x
())
return
true
;
if
(
a
.
x
()
<
b
.
x
())
return
true
;
...
@@ -1302,8 +1305,11 @@ namespace std
...
@@ -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.
Define std::less<vector<T,2> > so that you can use vector<T,2>s in the associative containers.
!*/
!*/
template
<
typename
T
>
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
inline
bool
operator
()
(
const
dlib
::
vector
<
T
,
2
>
&
a
,
const
dlib
::
vector
<
T
,
2
>
&
b
)
const
{
{
if
(
a
.
x
()
<
b
.
x
())
return
true
;
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