This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 12/30/2009 10:15 PM, Daniel Frey wrote: > Hi Paolo, > > after reading the new standard's draft once again, I tried to implement is_constructible (which has two cases) and I used that to implement is_explicitly_convertible on top of it (which is a no-brainer, really). > > The draft (N3000) requires the two-argument-form to test for > > static_cast<To>(create<From>()) > > to be valid, using > > template<typename T> typename add_rvalue_reference<T>::type create(); > > The other forms of is_constructible require > > To(create<From>()...) > > instead. While trying to implement that, I got stuck with another ICE for GCC 4.4 I don't know, really, because consider that anything having to do with C++0x things like decltype is rather unlikely to be fixed in 4_4-branch at this point. In any case, before filing anything please give an hand to the people triaging Bugzilla, and make sure nothing similar has been filed (hopefully fixed too) recently vs (in) mainline... > and I can't test GCC 4.5 - if it works, we could have both, otherwise it might be worth to send another bug report against 4.5? Note that the code does work for two-argument forms (like is_explicitly_convertible) on GCC 4.4, though. > > I attached the code which I think *should* work. If for GCC 4.5 it actually works, we could add both is_constructible and is_explicitly_convertible (well, at least as good as it gets until front-end support arrives...) > I have just committed the below in mainline. Everything looks in pretty good shape to me. Daniel, sorry, but at this point I have to remind you that it would be much better if you could file a copyright assignment. Otherwise, I don't think you can have further ChangeLog entries to your name. Sorry again, this is the FSF policy. Thanks again for now! Paolo. ///////////////////////
Attachment:
CL_is_constructible_explicitly_convertible
Description: Text document
Attachment:
patch_is_constructible_explicitly_convertible
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |