Thread: [Doxygen-develop] doxygen and standard C++ library
Brought to you by:
dimitri
From: johnk <jk...@ar...> - 2015-04-06 14:58:16
|
Dimitri, as I work on some enhancements for Doxygen, is there any reason I shouldn't use std as opposed to "qtools"? The first enhancement I did, some additional capabilities for markdown tables (column and row spans), I used std. The PlantUML enhancements I'm working on would really benefit from std, but I wanted to be sure there wasn't a reason not to implement things that way. |
From: Dimitri v. H. <do...@gm...> - 2015-04-06 17:11:03
|
Hi Johnk, > On 06 Apr 2015, at 16:58 , johnk <jk...@ar...> wrote: > > Dimitri, as I work on some enhancements for Doxygen, is there any reason > I shouldn't use std as opposed to "qtools"? The first enhancement I > did, some additional capabilities for markdown tables (column and row > spans), I used std. The PlantUML enhancements I'm working on would > really benefit from std, but I wanted to be sure there wasn't a reason > not to implement things that way. I try to keep doxygen's code very portable. As a result I have avoided using STL. You can of course say: but hey STL is *the* standard library supported by any compiler. While that somewhat true it wasn't very well supported back in the days (remember I started with doxygen in 1997) and still it is tempting to use stuff (like C++11 or boost) that is not generally supported on all platforms or drags in additional dependencies. Also STL uses exceptions whereas doxygen doesn't. So if any STL class throws an exception, doxygen will crash. My claim is that it is still hard to write portable code using STL. I'm not alone: see also the Mozilla guidelines: https://developer.mozilla.org/en-US/docs/Mozilla/C++_Portability_Guide So what do you need that is in STL, but not in qtools? Regards, Dimitri |
From: johnk <jk...@ar...> - 2015-04-06 17:28:54
|
On 04/06/2015 12:10 PM, Dimitri van Heesch wrote: > I try to keep doxygen's code very portable. As a result I have avoided using STL. I can understand not wanting to use STL, which, despite the name, was never really standardized, however the standard C++ library which is part of the C++ standard definition should be portable and consistent. Of course you noted that, though I thought stdc++ was part of the standard before rev 11. Boost I can certainly understand leaving out. I'm definitely not a fan of adding additional dependencies that are outside of a standard build environment (whatever that means :-). I had assumed that Doxygen had predated stdc++, but thought maybe there might be some momentum to "update" it. > Also STL uses exceptions whereas doxygen doesn't. So if any STL class throws an exception, > doxygen will crash. Fair enough. > So what do you need that is in STL, but not in qtools? I disagree with the assertion that the standard C++ library (of which STL is a predecessor) is not portable, but it's your baby. It's not so much that qtools doesn't have things that are unavailable, for me it's partially a matter of familiarity. Maybe even wholly. I find qtools confusing with its multiple implementations of string classes and so on. Qtools does a lot of the same stuff as stdc++ but I find the stdc++ implementation cleaner and more thorough, personally. I can certainly use the qtools, though it'd be helpful to get some clarification as to when to use "QGString" and when to use "QCString". The documentation of the former is just "This is an alternative implementation of QCString", which isn't terribly helpful. Also if you happen to have an emacs style setting that you can pass on so I can keep the formatting consistent, I'd appreciate it :-) |
From: johnk <jk...@ar...> - 2015-04-22 22:00:43
|
I'm getting OT and I've already made changes to my code to use qtools instead of stdlib, but out of curiosity of portability issues, I went looking and found the following: http://stackoverflow.com/questions/5205491/whats-this-stl-vs-c-standard-library-fight-all-about/5205571#5205571 On 04/07/2015 06:05 AM, Michael Stahl wrote: > On 06.04.2015 19:28, johnk wrote: >> On 04/06/2015 12:10 PM, Dimitri van Heesch wrote: >>> I try to keep doxygen's code very portable. As a result I have avoided using STL. >> I can understand not wanting to use STL, which, despite the name, was >> never really standardized, however the standard C++ library which is > STL is certainly part of the standard, and in particular part of the > "standard C++ library"; the implementations were just buggy for many > years (but nowadays things tend to work). > > 23 Containers library > 23.1 General > 23.2 Container requirements > 23.3 Sequence containers > 23.4 Associative containers > 23.5 Unordered associative containers > 23.6 Container adaptors > > 24 Iterators library > 24.1 General > 24.2 Iterator requirements > 24.3 Header <iterator> synopsis > 24.4 Iterator primitives > 24.5 Iterator adaptors > 24.6 Stream iterators > > 25 Algorithms library > 25.1 General > 25.2 Non-modifying sequence operations > 25.3 Mutating sequence operations > 25.4 Sorting and related operations > 25.5 C library algorithms > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > Doxygen-develop mailing list > Dox...@li... > https://lists.sourceforge.net/lists/listinfo/doxygen-develop > |
From: Michael S. <ms...@re...> - 2015-04-23 12:04:12
|
On 23.04.2015 00:00, johnk wrote: > I'm getting OT and I've already made changes to my code to use qtools > instead of stdlib, but out of curiosity of portability issues, I went > looking and found the following: > > http://stackoverflow.com/questions/5205491/whats-this-stl-vs-c-standard-library-fight-all-about/5205571#5205571 thanks for the link, so i was being inexcusably sloppy and assumed you meant that the containers/algorithms that comprise the STL were not in the C++ standard library while you actually meant "the STL as originally proposed by SGI back in the day"; sorry for the confusion - now that i understand your point, i fully agree with it :) |
From: Michael S. <ms...@re...> - 2015-04-07 11:05:57
|
On 06.04.2015 19:28, johnk wrote: > On 04/06/2015 12:10 PM, Dimitri van Heesch wrote: >> I try to keep doxygen's code very portable. As a result I have avoided using STL. > I can understand not wanting to use STL, which, despite the name, was > never really standardized, however the standard C++ library which is STL is certainly part of the standard, and in particular part of the "standard C++ library"; the implementations were just buggy for many years (but nowadays things tend to work). 23 Containers library 23.1 General 23.2 Container requirements 23.3 Sequence containers 23.4 Associative containers 23.5 Unordered associative containers 23.6 Container adaptors 24 Iterators library 24.1 General 24.2 Iterator requirements 24.3 Header <iterator> synopsis 24.4 Iterator primitives 24.5 Iterator adaptors 24.6 Stream iterators 25 Algorithms library 25.1 General 25.2 Non-modifying sequence operations 25.3 Mutating sequence operations 25.4 Sorting and related operations 25.5 C library algorithms |