Why Not STL?

team bbl


First, let's deal with a question commonly asked about wxWidgets data structure classes: "Why doesn't wxWidgets just use the Standard Template Library (STL)?" The main reason is historical: wxWidgets has existed since 1992, long before STL could reliably be used across different platforms and compilers. As wxWidgets has evolved, many of the data structure classes have gravitated towards an STL-like API, and it is expected that eventually STL equivalents will replace some wxWidgets classes.

Meanwhile, you can still use STL functionality in your wxWidgets applications by setting wxUSE_STL to 1 in setup.h (or by passing enable-stl when configuring) to base wxString and other containers on the STL equivalents. Be warned that using STL with wxWidgets can increase both the library size and compilation time, especially when using GCC.

    team bbl



    Cross-Platform GUI Programming with wxWidgets
    Cross-Platform GUI Programming with wxWidgets
    ISBN: 0131473816
    EAN: 2147483647
    Year: 2005
    Pages: 262

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net