Consider I inherit from a variadic template the entire arguments list. How are the arguments inherited?
// snippet
template<typename... R>
class foo
: public R... {
public:
};
// ....
using foo_inst = foo<bar_1, bar_2>;
I tried it, and it seems all R
's are inherited public (not just the first one). Is this defined behavior?
I tried it with gcc and msvc (thanks to jaggedSpire also with clang), all with same results. The compilers not even mentioned any warnings. You can see a running example here.