Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
boolinq
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
boolinq
Commits
8f5f8cff
Commit
8f5f8cff
authored
Jun 29, 2019
by
Anton Bukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compiler loop on avg and sum
parent
06f47fd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
boolinq.h
include/boolinq/boolinq.h
+3
-3
No files found.
include/boolinq/boolinq.h
View file @
8f5f8cff
...
...
@@ -266,7 +266,7 @@ namespace boolinq {
T
value
=
tuple
.
linq
.
next
();
_TKey
key
=
apply
(
value
);
if
(
tuple
.
set
.
insert
(
key
).
second
)
{
return
std
::
make_pair
(
key
,
tuple
.
linqCopy
.
where
([
apply
,
key
](
T
&
v
){
return
std
::
make_pair
(
key
,
tuple
.
linqCopy
.
where
([
apply
,
key
](
T
v
){
return
apply
(
v
)
==
key
;
}));
}
...
...
@@ -388,7 +388,7 @@ namespace boolinq {
template
<
typename
TRet
=
T
>
TRet
sum
()
const
{
return
cast
<
TRet
>
().
sum
(
);
return
sum
([](
T
value
)
{
return
TRet
(
value
);
}
);
}
template
<
typename
F
,
typename
_TRet
=
typename
std
::
result_of
<
F
(
T
)
>::
type
>
...
...
@@ -405,7 +405,7 @@ namespace boolinq {
template
<
typename
TRet
=
T
>
TRet
avg
()
const
{
return
cast
<
TRet
>
().
avg
(
);
return
avg
([](
T
value
)
{
return
TRet
(
value
);
}
);
}
int
count
()
const
...
...
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