On Samstag, 6. Juli 2019 14:50:05 CEST Fabian Kosmale wrote: > Hi, > > Actually, most of the time there is actually an option 3. Add yet another > overload, this time for int. This will match the 0 literal without any > conversion, and we can then just call the nullptr overload inside. > Unfortunately, C++20 still does not have constexpr parameters, else we > could ensure at compile time that only 0 is allowed. Currently, we can only > add a runtime assert as far as I can see.
Constexpr parameters.. Hmm, will it be possible to mark constructors consteval? That would have to be constexpr parameters then. Unfortunately last I checked no compiler had implemented consteval yet, so no experimentation. 'Allan _______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
