-4

Microsoft's documentation often makes use of ^ in places where I would expect either a * or &.

Example:

public:
event UnhandledExceptionEventHandler^ UnhandledException {
    virtual void add(UnhandledExceptionEventHandler^ value) sealed;
    virtual void remove(UnhandledExceptionEventHandler^ value) sealed;
}

The use of ^ really puzzles me.

nvoigt
  • 75,013
  • 26
  • 93
  • 142
Clearer
  • 2,166
  • 23
  • 38
  • 2
    What research have you done? – nicomp Oct 23 '17 at 13:43
  • 3
    trivial duplicate of [c++ caret^ Vs. Pointer\*?](https://stackoverflow.com/questions/8701282/c-caret-vs-pointer) or [What does the caret (‘^’) mean in C++/CLI?](https://stackoverflow.com/questions/202463/what-does-the-caret-mean-in-c-cli) – underscore_d Oct 23 '17 at 13:43
  • That's not standard C++ if that is what you are asking. That is probably some managed C++-CLI flavor with its grammar and set of rules. – Ron Oct 23 '17 at 13:44
  • @nicomp I read as much documentation as I could find on microsoft's site. I had no idea they where talking about C++/CLI since the documentation only talks about C++ with no indication that it's an entirely different language. – Clearer Oct 23 '17 at 14:00

1 Answers1

2

That is either C++/CX or C++/CLI, and the ^ indicates a reference of some sort--either a pointer to a managed reference type or handle.

https://blogs.msdn.microsoft.com/vcblog/2012/09/17/ccx-part-2-of-n-types-that-wear-hats/

In C++/CLI, what does the hat character ^ do?

jazzdelightsme
  • 457
  • 3
  • 14