Skip to content

Commit

Permalink
get_as_X should return type X (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
deads committed Jun 30, 2017
1 parent de3044a commit 2e28660
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/python_input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ namespace ParaText {
}

template <class T>
typename std::enable_if<std::is_arithmetic<T>::value, float>::type
typename std::enable_if<std::is_arithmetic<T>::value, long>::type
get_as_long(const T &t, size_t item_size) {
(void)item_size;
return (long long)t;
}


template <class T>
typename std::enable_if<std::is_arithmetic<T>::value, float>::type
typename std::enable_if<std::is_arithmetic<T>::value, bool>::type
get_as_bool(const T &t, size_t item_size) {
(void)item_size;
return (bool)t;
Expand Down

1 comment on commit 2e28660

@tiagokapp
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int somaimpar(int a){

if (a==1){
	return 1;
}
else {
	return somaimpar(a-1) + (2*a-1);
}

}

Please sign in to comment.