This code works with gcc and clang but doesn't compile with icc 2016 with std=c++14
#include <vector> #include <iostream> template<template<class...> class Cont, class... Params> auto f(const Cont<Params...>& v) { return Cont<double>{}; } int main() { std::vector<float> v; auto w = f(v); std::cout << std::is_same<decltype(w), std::vector<double>>::value << "\n"; return 0; }