Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP aC++ Version A.03.25 Release Notes: HP Series 9000 > Chapter 1 Features

Migrating from HP C++ (cfront) to HP aC++

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

The compiler lists Errors, Future Errors and Warnings. Expect to see more warnings, errors and future errors reported in your code, many related to standards based syntax. For more complete information, refer to:

  1. HP aC++ Transition Guide at the following world wide web URL:

     http://www.hp.com/go/c++
  2. For general background information and experience, subscribe to the cxx-dev list server (like a notes group). Send a message to majordomo@cxx.cup.hp.com with the following command in the body of the message: subscribe list-name

    Available list-names are as follows:

    cxx-dev		  HP C++ Development Discussion List
    cxx-dev-announce HP C++ Development Announcements
    cxx-dev-digest HP C++ Development Discussion List Digest

    cxx-dev-announce is also broadcast to cxx-dev, so there is only a need to subscribe to one of the lists. The digest also includes both cxx-dev and cxx-dev-announce.

    For additional help or information about the list server, send a message to majordomo@cxx.cup.hp.com with the following command in the body of the message: help

  3. For specific support questions, contact your HP support representative.

  4. For generic C++ questions, see documents and URL's listed in the HP aC++ Online Programmer's Guide, Information Map.

Some migration issues are listed below:

  • The overload resolution for operators has been updated to reflect the C++ standard. You may see some additional "ambiguous" function error messages displayed.

  • Most frequently reported migration issue: enum x { x1, }; The trailing comma is an error, and aC++ generates Warning 921.

  • Changes to temporary creation for rvalues used to initialize return values which are const references now causes:

    Error 652: Exact position unknown; near file, line#.
    Initialization of the result <some const &> requires creating a
    temporary, yet the temporary's lifetime ends with the return from the function.
  • You can bracket your HP aC++ changes with the macro defined by the draft standard. For example:

    #if __cplusplus >= 199707L
    // HP aC++ Code
    #endif // __cplusplus >= 199707L
  • If you are using directed mode instantiation with the cfront based compiler, an awk script can be used to convert your file to an instantiation file that uses the explicit instantiation syntax. Note that explicit instantiation syntax can be used to instantiate a template and all of its member functions, an individual template function, or a template class's member function. The HP aC++ Online Programmer's Guide contains an example script.

  • In a template, a name with a parameter-dependent qualifier is not taken to be a type unless it is explicitly declared as one with the typename keyword.

    You need to explicitly declare a type or a member function type using the typename keyword when all of the following are true:

    • The code is inside a template.

    • The name is qualified (i.e., it has a "::" token in it).

    • The qualifier (to the left of the "::" token) depends on a template parameter.

    For example, the following code includes the typename keyword to declare iterator as a type:

    #include <list>											
    template <class Element>
    class Foo {
    public:
    list<Element> e;
    typedef typename list<Element>::iterator MyIterator;
    };

    For more information, refer to the HP aC++ Transition Guide at the following World Wide Web URL:

    http://www.hp.com/esy/lang/cpp/tguide

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.