📄 specbug.htm
字号:
For template class specializations within the dtl
namespace, there is a compiler bug (<a
href="http://support.microsoft.com/support/kb/articles/Q263/6/33.ASP">http://support.microsoft.com/support/kb/articles/Q263/6/33.ASP</a>)
that forces us to explicitly qualify with dtl::
or reopen the namespace dtl and declare the
specialization in there as you'll notice
with DefaultBCA and DefaultBPA in both the
example and test code. The compiler bug
applies to explicit instantiations, but also
applies in our case with explicit specializations.
This problem doesn't seem to occur for the
specialization of template functions from within
our namespace. The following is an example of how to declare these specializations:
<pre><code>
// Examples of proper specialization of DefaultBCA and DefaultBPA
// in Visual Studio 6.0
// for some reason specialization needs to use namespace prefix dtl::
// on identifier
template<> class dtl::DefaultBCA<Example>
{ // ... members ... };
template<> class dtl::DefaultBPA<Example>
{ // ... members ... };
</code></pre>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -