Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

C++ Double-Colon Scope Resolution Operator

    Use the double colon operator (::) to qualify a C++ member function, a top-level function, or a variable with global scope with the following name types:

  • An overloaded name (same name used with different argument types)

  • An ambiguous name (same name used in different classes)

If you do not qualify an overloaded function name, dbx displays an overload list so you can choose which function you will navigate. If you know the function class name, you can use it with the double-colon scope resolution operator to qualify the name.

(dbx) func class::function-name (args)

For example, if hand is the class name and draw is the function name:

(dbx) func hand::draw