Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

bug with variadic template-template parameters

$
0
0

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;
}                                                

 


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>