столкнулся с ошибками в следующем коде
template<class ICustomStatistics>
class СStatistics_Periodic : public IBaseStatistics
{
protected:
using statistics_block_pr = std::pair<double, ICustomStatistics>;
using statistics_blocks_t = std::vector<statistics_block_pr>;
using statistics_links_t = std::vector<statistics_blocks_t::iterator>; // ОШИБКА
Error C2923 'std::vector': 'std::vector,std::allocator<_Ty>>::iterator' is not a valid template type argument for parameter '_Ty'
и
Error C3203 'allocator': unspecialized class template can't be used as a template argument for template parameter '_Alloc', expected a real type
все на строчку
using statistics_links_t = std::vector<statistics_blocks_t::iterator>;
Не могу понять - а что не нравится то?
Вектор объектов и вектор итераторов
При использовании зависимых (от параметра шаблона) имен необходимо использовать ключевое слово typename. Иначе, за неимением возможности определить, чем является iterator, компилятор по-умолчанию будет впоспринимать его как имя переменной.
using statistics_links_t = std::vector<typename statistics_blocks_t::iterator>;
Продвижение своими сайтами как стратегия роста и независимости