Boost C++ Libraries: Ticket #5436: C++0x patch for boost::unit https://svn.boost.org/trac10/ticket/5436 <p> The attached patch makes boost::unit work correctly in C++0x, by making the code NOT compile when a dimension ordinal is used more than once. </p> <p> At the moment this code is only needed in clang's c++0x mode, but it doesn't seem to break g++ c++03 or c++0x, so put it all the time. </p> <p> The technique currently used (friend functions being double declared) doesn't work any more in C++0x, as: </p> <p> C++03 says: When a function is defined in a friend function declaration in a class template, the function is defined at each instantiation of the class template. The function is defined even if it is never used. </p> <p> C++0x says: When a function is defined in a friend function declaration in a class template, the function is instantiated when the function is odr-used. </p> <p> The new technique makes functions with different return values, which still causes an error. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5436 Trac 1.4.3 Chris Jefferson Thu, 07 Apr 2011 10:42:36 GMT attachment set https://svn.boost.org/trac10/ticket/5436 https://svn.boost.org/trac10/ticket/5436 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">units.patch</span> </li> </ul> Ticket Steven Watanabe Thu, 07 Apr 2011 14:50:56 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5436#comment:1 https://svn.boost.org/trac10/ticket/5436#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/71081" title="Fix checking for double registration with clang in C++0x mode. Fixes ...">[71081]</a>) Fix checking for double registration with clang in C++0x mode. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5436" title="#5436: Patches: C++0x patch for boost::unit (closed: fixed)">#5436</a>. </p> Ticket