Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 8 years ago

Language

Compiler

Options

Author

anonymous

almost 8 years ago

find.h
count.h

$
In file included from prog.cc:9:
./count.h:3:20: warning: unused parameter 'first' [-Wunused-parameter]
size_t count_if(It first, It last, const F& predicate)
                   ^
./count.h:3:30: warning: unused parameter 'last' [-Wunused-parameter]
size_t count_if(It first, It last, const F& predicate)
                             ^
./count.h:3:45: warning: unused parameter 'predicate' [-Wunused-parameter]
size_t count_if(It first, It last, const F& predicate)
                                            ^
./count.h:9:17: warning: unused parameter 'first' [-Wunused-parameter]
size_t count(It first, It last, const T& value)
                ^
./count.h:9:27: warning: unused parameter 'last' [-Wunused-parameter]
size_t count(It first, It last, const T& value)
                          ^
./count.h:9:42: warning: unused parameter 'value' [-Wunused-parameter]
size_t count(It first, It last, const T& value)
                                         ^
./count.h:12:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
prog.cc:28:16: note: in instantiation of function template specialization 'my::count<std::__1::__wrap_iter<std::__1::basic_string<char> *>, char [4]>' requested here
    assert(my::count(v.begin(), v.end(), "the") == 2);
               ^
In file included from prog.cc:9:
./count.h:12:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
prog.cc:30:16: note: in instantiation of function template specialization 'my::count<std::__1::__wrap_iter<std::__1::basic_string<char> *>, char [6]>' requested here
    assert(my::count(v.begin(), v.end(), "hello") == 0);
               ^
In file included from prog.cc:9:
./count.h:6:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
prog.cc:31:16: note: in instantiation of function template specialization 'my::count_if<std::__1::__wrap_iter<std::__1::basic_string<char> *>, (lambda at prog.cc:18:16)>' requested here
    assert(my::count_if(v.begin(), v.end(), contains('o')) == 4);
               ^
9 warnings generated.
Signal:
Illegal instruction