Mateusz Loskot :: hacking on, working out, living up

Traits of void resolved

15 Nov 2009 | mloskot

It looks like I’ve got clarified status of the traits of void type. I posted my question to libstdc++ where Paolo Carlini kindly provided me what the bits I have been missing. Now, all the puzzles are in place:

[n1836], the specifications for the TR1 features mandates true for is_pod, etc. Arguably this is a defect, which has been fixed in the ongoing work for the next standard, so-called C++0x.

The TR1 document in section 4.9 states:

8 It is unspecified under what circumstances, if any, is_pod::value evaluates to true, except that, for all types T:

<span class="n">is_pod</span><span class="o"><</span><span class="n">T</span><span class="o">>::</span><span class="n">value</span> <span class="o">>=</span>
   <span class="p">(</span><span class="n">is_scalar</span><span class="o"><</span><span class="n">T</span><span class="o">>::</span><span class="n">value</span> <span class="o">||</span> <span class="n">is_void</span><span class="o"><</span><span class="n">T</span><span class="o">>::</span><span class="n">value</span><span class="p">);</span>

Given that, the bug report ID:458570 I submitted to Visual C++ 9.0 and it’s TR1 implementation on Microsoft Connect stays valid and according to what Stephan T. Lavavej confirmed in comments to my report, it’s been fixed in Visual C++ 10.0.

Paolo also added a note particularly important to programmers relying on C++ implementation by GCC compiler and libstdc++ library:

In general, we consider TR1 essentially frozen at this time and minimally maintained, consider that it was just an interim Technical Report

Here are references that are fundamental for the matter:

Mission accomplished ;-)

Fork me on GitHub