Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-657

[HP aCC 3.39] confused taking the address of an overloaded member

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • External
    • None
    • HP aCC 3.25 - (at least) 3.39

    • Compiler Error

    Description

      Moved from Rogue Wave bug tracking database:

      ***Created By: sebor @ Dec 29, 2000 09:03:26 PM***
      Subject: aCC 3.25 confused taking the address of an overloaded member
      Date: Fri, 29 Dec 2000 21:03:09 -0700
      From: Martin Sebor <sebor@roguewave.com>
      Organization: Rogue Wave Software, Inc.
      To: HP aCC mailing list <acxx-beta@cup.hp.com>

      Here's another member template problem.

      Martin

      $ cat t.cpp
      template<class T>
      struct S

      { void foo (S&) throw (); template <class U> void foo (S<U>&) throw (); }; int main () { void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo; }

      $ aCC -V -c t.cpp
      aCC: HP ANSI C++ B3910B A.03.25
      Error 722: "t.cpp", line 12 # The exception specification for the source must
      be at least as restrictive as the exception specification for the
      destination.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^
      Error 722: "t.cpp", line 12 # The exception specification for the source must
      be at least as restrictive as the exception specification for the
      destination.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^
      Error 706: "t.cpp", line 12 # An overloaded variable may not be used in this
      context.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^^^^^^^^^^^
      ***Modified By: sebor @ Jan 03, 2001 09:51:13 PM***
      Subject: Re: aCC 3.25 confused taking the address of an overloaded member
      Date: Wed, 3 Jan 2001 20:48:08 -0800 (PST)
      From: Dennis Handly <dhandly@cup.hp.com>
      To: acxx-beta@cup.hp.com, sebor@roguewave.com

      >Here's another member template problem.
      Martin

      Error 722: The exception specification for the source must
      be at least as restrictive as the exception specification for the
      destination.

      I filed the following for you:
      CR JAGad44411
      Error 722 throw spec problem with member templates
      ***Modified By: sebor @ Feb 23, 2001 09:18:09 PM***
      Bug persists in 3.27:
      $ aCC -V -c -AA t.cpp
      aCC: HP ANSI C++ B3910B A.03.27
      Error 722: "t.cpp", line 12 # The exception specification for the source must
      be at least as restrictive as the exception specification for the
      destination.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^
      Error 722: "t.cpp", line 12 # The exception specification for the source must
      be at least as restrictive as the exception specification for the
      destination.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^
      Error 706: "t.cpp", line 12 # An overloaded variable may not be used in this
      context.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^^^^^^^^^^^
      ***Modified By: sebor @ Jan 28, 2003 11:48:35 AM***
      Still broken in 3.39.

      $ cat t.cpp && aCC +w -AA -V t.cpp && ./a.out; echo $?

      template<class T>
      struct S

      { void foo (S&) throw (); template <class U> void foo (S<U>&) throw (); }; int main () { void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo; }

      aCC: HP ANSI C++ B3910B A.03.39
      Error 722: "t.cpp", line 13 # The exception specification for the source must
      be at least as restrictive as the exception specification for the
      destination.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^
      Error 722: "t.cpp", line 13 # The exception specification for the source must
      be at least as restrictive as the exception specification for the
      destination.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^
      Error 706: "t.cpp", line 13 # An overloaded variable may not be used in this
      context.
      void (S<int>::*pf) (S<int>&) throw () = &S<int>::foo;
      ^^^^^^^^^^^

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebor Martin Sebor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: