Greetings Alf,
You haven't shown the use of the type, in particular foo.
Not sure I'm following you.
But it seems like a case of search and replace.
Some refactoring tools may be able to do that for you, but an editor is probably
easiest.
I want a mix of hw_default_type and hw_register_struct_type within the
code. I think I just had a revelation though (this after firing up
thinking in C++ vol 2). perhaps I could derive off the default. ie.
template < typename UnsignedType,
typename default_policy = no_policy < UnsignedType > ,
unsigned base = 0, unsigned offset = 0 >
struct hw_default {
// default implementation....
};
template < typename UnsignedType,
typename use_this_policy,
unsigned base = 0, unsigned offset = 0 >
struct i_dont_want_default :
public hw_default < UnsignedType, altera_reg, base, offset > {
// stuff..
};
If the purpose is to be able to use a single name and easily change the code in
one place to have that name refer to different types, then how about a typedef.