File tree 2 files changed +4
-2
lines changed
8-writing_generic_functions/generics
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
.color_coded
3
3
_vimrc_local.vim
4
4
* .o
5
+ build /
5
6
6
7
# # Ignore Visual Studio temporary files, build results, and
7
8
# # files generated by popular Visual Studio add-ons.
@@ -277,4 +278,4 @@ __pycache__/
277
278
278
279
# Cake - Uncomment if you are using it
279
280
# tools/**
280
- # !tools/packages.config
281
+ # !tools/packages.config
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ using std::isspace;
23
23
template <class T >
24
24
T median (vector<T> v) {
25
25
typedef typename vector<T>::size_type vec_sz;
26
+ vec_sz size = v.size ();
26
27
if (size == 0 ) {
27
28
throw domain_error (" Median of an empty vector" );
28
29
}
@@ -127,4 +128,4 @@ int main() {
127
128
split (s, ostream_iterator<string>(cout, " \n " ));
128
129
}
129
130
return 0 ;
130
- }
131
+ }
You can’t perform that action at this time.
0 commit comments