Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
ac0c1325
Commit
ac0c1325
authored
Aug 24, 2015
by
Tiago Peixoto
Browse files
Add 'Allocator' template parameter to vector template specializations
parent
1e5a0f49
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/graph/graph_util.hh
View file @
ac0c1325
...
...
@@ -560,10 +560,10 @@ struct hash<std::pair<T1, T2>>
}
};
template
<
class
Value
>
struct
hash
<
vector
<
Value
>>
template
<
class
Value
,
class
Allocator
>
struct
hash
<
vector
<
Value
,
Allocator
>>
{
size_t
operator
()(
const
vector
<
Value
>&
v
)
const
size_t
operator
()(
const
vector
<
Value
,
Allocator
>&
v
)
const
{
size_t
seed
=
0
;
for
(
const
auto
&
x
:
v
)
...
...
src/graph/hash_map_wrap.hh
View file @
ac0c1325
...
...
@@ -53,10 +53,10 @@ struct empty_key
}
};
template
<
class
Key
>
struct
empty_key
<
std
::
vector
<
Key
>>
template
<
class
Key
,
class
Allocator
>
struct
empty_key
<
std
::
vector
<
Key
,
Allocator
>>
{
static
std
::
vector
<
Key
>
get
()
static
std
::
vector
<
Key
,
Allocator
>
get
()
{
return
{
empty_key
<
Key
>::
get
()
};
}
...
...
@@ -118,10 +118,10 @@ struct deleted_key
}
};
template
<
class
Key
>
struct
deleted_key
<
std
::
vector
<
Key
>>
template
<
class
Key
,
class
Allocator
>
struct
deleted_key
<
std
::
vector
<
Key
,
Allocator
>>
{
static
std
::
vector
<
Key
>
get
()
static
std
::
vector
<
Key
,
Allocator
>
get
()
{
return
{
deleted_key
<
Key
>::
get
()
};
}
...
...
Write
Preview
Supports
Markdown
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