Take a look at the bold region...It is wrong..but I would need something like that for the constructor..!
Code:
namespace set_mm{
template<class X>
class set
{
public:
std::vector<X> dat;
void insert(X);
void insert(set<X>);
set<X>(std::array<X,int>); //haywire...would actually need an int :(
//Other Constructors
bool containp(X); //p for lisp'y predicates..!
bool subsetp(set<X>);
};
}
The place where I put 'int' must contain a constant integer at compile time...
But.. how would I make the constructor able to handle "std::array"s of many sizes ?.
(I don't need the size to be decided at runtime...the program using the class would have to somehow pass it..)
I am making a set class based on the mathematical concept of set...because std::set is falling short of some of the tasks..and I don't need any sort of searching or sorting ..so vectors instead of a btree.