I want to create a template that will take variadic number of a specific class that contains a string. When i try to make such a template class, it throws no instance of constructor "A" matches the argument list
class A:
template<template_string s>
class A {};
class B:
template<A... As>
class B {};
template_string.h:
template<size_t _N>
struct template_string {
char c_str[_N];
constexpr template_string(const char(&text)[_N]) {
std::copy(text, text+_N, c_str);
}
constexpr std::string std_str() const noexcept {
return std::string(c_str);
}
constexpr std::string_view str_view() const noexcept {
return std::string_view(c_str);
}
constexpr size_t length() const noexcept {
return _N-1;
}
};
I want to make it explicitly through templates and classes. What would i need to do so that I can construct class B like this:
B<A<"text">(), A<"other text">(),....> b;
template<template_string s>.