Questions tagged [template-argument-deduction]

Template argument deduction is a compiler attempt to deduce template arguments when some are omitted.

692 questions
-2
votes
1 answer

Which foo template will be instantiated?

Given this code: #include template auto foo() -> typename std::enable_if<(sizeof...(Cs) > 1)>::type{ } template void foo() { } int main(){ foo<'s'>(); } I have the above c++ program and I'm just wondering,…
-3
votes
1 answer

Compiling error while using getline(): 'mismatched types'

I keep getting this error (it's a really long one but I think the most important part is this): main.cpp:9:30: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'const char [2]' While compiling this bit of…
aachh
  • 93
  • 2
  • 5
1 2 3
46
47