Boost C++ Libraries: Ticket #12003: Implement is_constrructible<T, U> -- no variadics https://svn.boost.org/trac10/ticket/12003 <p> In the current implementation of trait boost::is_constructible, unless the compiler offers variadic templates (and some more), is implemented as boost::is_convertible, and that's it. </p> <p> I understand the limitations, but would it be possible to provide a more accurate version for the case with exactly two parameters: boost::is_constructible&lt;T, U&gt;. This would check the construction with a single argument, so it does not require variadic templates, and it would cover a significant number of use cases. For instance it would unblock my ticket: </p> <p> <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/12002"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/12002</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12003 Trac 1.4.3 raad@… Fri, 19 Feb 2016 02:21:07 GMT cc changed https://svn.boost.org/trac10/ticket/12003#comment:1 https://svn.boost.org/trac10/ticket/12003#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">raad@…</span> added </li> </ul> Ticket akrzemi1 Fri, 19 Feb 2016 07:34:59 GMT <link>https://svn.boost.org/trac10/ticket/12003#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12003#comment:2</guid> <description> <p> And possibly define a macro saying if at least two-argument version is implemented, in a form similar to Boost.Config. This way the user could make a decision whether to use the trait or not. </p> </description> <category>Ticket</category> </item> <item> <author>marci_r@…</author> <pubDate>Fri, 19 Feb 2016 20:31:11 GMT</pubDate> <title>cc changed https://svn.boost.org/trac10/ticket/12003#comment:3 https://svn.boost.org/trac10/ticket/12003#comment:3 <ul> <li><strong>cc</strong> <span class="trac-author">marci_r@…</span> added </li> </ul> Ticket John Maddock Sat, 20 Feb 2016 17:47:27 GMT <link>https://svn.boost.org/trac10/ticket/12003#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12003#comment:4</guid> <description> <p> Which compiler are we talking about here? We really do need a C++11 compiler to implement even a non-variadic version. We could possibly extend it to msvc-12 and gcc-4.4 in a non-variadic form (or possibly there would still be compiler bugs preventing that - I seem to remember the issue with gcc-4.4 was with use of decltype). If you're hoping for a C++03 version then you'll need to supply a PR. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>akrzemi1</dc:creator> <pubDate>Sat, 05 Mar 2016 22:32:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12003#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12003#comment:5</guid> <description> <p> Visual Studio for, I think, two releases supported <code>decltype</code> but no variadic templates. I really had this compiler in mind. </p> <p> Whether this makes sense or not is one question, but the other question remains. It is not strictly in the scope of this library, but could you give me a macro that says if the is_constructible works correctly or falls back to a negative default? Currently I had to repeat the long #if from is_constructible.hpp, as I cannot rely on the 'safe' default. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 02 Feb 2018 19:26:07 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12003#comment:6 https://svn.boost.org/trac10/ticket/12003#comment:6 <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> Somewhat better late than never, the macro BOOST_TT_IS_CONSTRUCTIBLE_CONFORMING will now be set when the trait is fully usable. </p> Ticket