python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Class template argument deduction - why does it fail here?
Why does the following CTAD attempt fail to compile ?
template <typename T> struct C { C(T,T) {} };
template <> struct C<int> { C(int) {} };
C c(1); //error: template argument dedu...
user1958486
Votes: 0
Answers: 1
How to specialize a class template with a template?
Consider the class template:
template<typename T>
struct A
{
T data;
static const bool flag;
static bool calc_flag()
{
// Default value;
return false;
}
};
template<typena...

Serge Roussak
Votes: 0
Answers: 1
C++ overload of swap function not working
I'm writing a custom class for which I want to use the std::swap function.
As I read in this post How to overload std::swap() , I have to overload it in the same namespace of the object I'm trying to ...
linamamm
Votes: 0
Answers: 1
How to specialize base class template method from derived class?
I'm trying to specialize a base class method from a derived class template, but I'm not sure what would be the proper syntax to achieve it.
For implementation reasons, I need a class structure similar...
joaocandre
Votes: 0
Answers: 2