Say I have a class:
Code:
template
<
	typename T,
	template<typename> class DebugPolicy = ???
>
class debug_ptr: public DebugPolicy<T>
This class will derive from a specified policy.

Now, I define two policies:
Code:
template<typename T> class DebugPtrDebugPolicy
template<typename T> class DebugPtrReleasePolicy
The idea, then, is to be able to invoke the class using:

debug_ptr<int, DebugPtrDebugPolicy>

Or such.
This is all good and well, but only if I explicitly select a policy as default for the class template, such as:

Code:
template
<
	typename T,
	template<typename> class DebugPolicy = DebugPtrDebugPolicy
>
class debug_ptr: public DebugPolicy<T>
However, this is short of what I want to accomplish.
If it's debug mode, it should automatically choose DebugPtrDebugPolicy, and if it's release mode, it should choose DebugPtrReleasePolicy.
This is where I hit a snag.

Determining if it's debug mode isn't a problem:
Code:
namespace Debug
{
#ifdef _DEBUG
	static const bool IsDebugMode = true;
	static const bool IsReleaseMode = false;
#else
	static const bool IsDebugMode = false;
	static const bool IsReleaseMode = true;
#endif
}
But choosing a class over the other depending on it, is.
A sort of compile-time if.
Of course, boost has one in the form of boost::mpl::if_c, but the prototype is:

template<bool, typename, typename>

So this code won't compile:
Code:
template
<
	typename T,
	template<typename> class DebugPolicy = boost::mpl::if_c<Debug::IsDebugMode, DebugPtrDebugPolicy, DebugPtrReleasePolicy>::type
>
class debug_ptr: public DebugPolicy<T>
(I'm not sure if typename is required here.)
The reason being that DebugPtrDebugPolicy is template<typename>, a non-specialized class, and boost's if only accepts specialized classes as arguments.

So is there any good alternative C++ way of a solution to this?
Because I want the user to be able to choose a policy without explicitly specializing it with the type.

I've tried all sorts of complexity, but what I got is circular template references -_-
Anyone has any ideas on thus? I'd appreciate it.