Boost C++ Libraries: Ticket #9018: No cross-version constructor https://svn.boost.org/trac10/ticket/9018 <p> I was writing a numeric class template, and it has constructor templates for cross-version conversion. When I tested with two <code>boost::rational</code> instantiations as the component types, the code calls <code>static_cast</code> at the component level, which fails since we never defined that between <code>rational</code> instantiations. (There's the <code>boost::rational_cast</code> function template, but that doesn't help in generic code.) Let's fix that. </p> <p> We could be fancy and add a non-explicit constructor template for when the component types are implicitly convertible, and an explicit version otherwise, but that would be rude to add C++11 features to a class that's otherwise C++98. Maybe we'll add it someday.... </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9018 Trac 1.4.3 Daryle Walker Tue, 27 Aug 2013 10:35:27 GMT <link>https://svn.boost.org/trac10/ticket/9018#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9018#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85484" title="Added cross-instantiation constructor template, refs #9018.">[85484]</a>) Added cross-instantiation constructor template, refs <a class="new ticket" href="https://svn.boost.org/trac10/ticket/9018" title="#9018: Bugs: No cross-version constructor (new)">#9018</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>