On 1/27/2012 4:14 PM, ext João Abecasis wrote:
> - Provide standard-compliant implementations of the algorithms in
> QtAlgorithms (no 'q' prefixes, no camel casing -- sorry!) and
> selectively import those into a known namespace when QT_NO_STL is
> defined:
>
>      namespace QtPrivateStd {
>      #ifdef QT_NO_STL
>          using namespace std;
>      #else
>          using namespace QtPrivateStlImpl::std;
>      #endif
>      }
>
> Utilities in QtPrivateStlImpl would be based on what is already in
> QtAlgorithms, changed to syntactically and semantically match the
> standard library.

Hi,

I think this is a good idea. I've caught myself including both 
<QtAlgorithms> and <algorithm> in a file for the sake of sticking to the 
Qt ones when possible (due to style/convention). This would then be a 
nice mindset change.

It's probably worth to remember that for consistency this might require 
adding more versions of the algorithms already existent in QtAlgorithms. 
I think at least qEqual doesn't have a version which takes a binary 
predicate (as the STL does).


Cheers,
Leandro

-- 
Leandro T. C. Melo
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to