Код: Выделить всё
template
int some_function(const Container& container)
{
if (container has iterator) { //
// get an element by its iterator
} else {
// do another action
}
}
Подробнее здесь: https://stackoverflow.com/questions/476 ... ype-or-not
Код: Выделить всё
template
int some_function(const Container& container)
{
if (container has iterator) { //
// get an element by its iterator
} else {
// do another action
}
}