Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alvarez, Gonzalo
PsimagLite
Commits
7f703dc5
Commit
7f703dc5
authored
Nov 11, 2021
by
Alvarez, Gonzalo
Browse files
PredicateSimple: compilation fix
parent
7a6ee8e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/PredicateSimple.h
View file @
7f703dc5
...
...
@@ -85,20 +85,16 @@ private:
if
(
op
==
">="
)
return
(
lv
>=
rv
);
if
(
op
==
"%%"
)
return
divisibleBy
(
lv
,
rv
);
return
divisibleBy
<
T
>
(
lv
,
rv
);
throw
RuntimeError
(
"Unknown operator "
+
op
+
"
\n
"
);
}
static
bool
divisibleBy
(
SizeType
lv
,
SizeType
rv
)
template
<
typename
T
>
static
bool
divisibleBy
(
SizeType
lv
,
SizeType
rv
,
typename
std
::
enable_if
<
Loki
::
TypeTraits
<
T
>::
isArith
,
int
*>::
type
=
0
)
{
return
((
lv
%
rv
)
==
0
);
}
static
bool
divisibleBy
(
double
,
double
)
{
throw
PsimagLite
::
RuntimeError
(
"Called DivisibleBy (%%) but args are not integer types
\n
"
);
}
static
SizeType
operatorLength
(
String
op
)
{
const
SizeType
n
=
ops_
.
size
();
...
...
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