I have a class in the namespace in the header file. The class requires a template type, and I want certain types to be used. The following is an example.
A.hpp file
B.hpp file
// b.hpp
File main.cpp
// main.cpp
So, as you can see from a rather elaborate example, the ultimate goal is to NOT ALLOW the end user to declare class a with float as the type name and only be able to use predefined classes with specific types declared typedef a<double> a_double; .
I thought that the above example would allow this, but I was wrong because I can create a<float> as above because I include b.hpp , which in turn includes a.hpp ! So you see the problem! (Hope?)
Perhaps this is a simple solution, if at all possible.
source share