• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie post. AssertMacros.h "check" function collides with C++ inline function defined in my namespace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie post. AssertMacros.h "check" function collides with C++ inline function defined in my namespace


  • Subject: Re: Newbie post. AssertMacros.h "check" function collides with C++ inline function defined in my namespace
  • From: Rippit the Ogg Frog <email@hidden>
  • Date: Mon, 27 Jul 2009 10:13:32 -0700

Macros aren't in namespaces, and are expanded before the code is compiled.

So your choices are either to #undef the check macro, or rename your check function so that it doesn't collide with the macro.

To be more clear, compiling takes place in several phases. The first phase is to run the C preprocessor, which among other things expands macros.

The next step after that is to parse your C++ source, which is where your check function would get compiled - but the C preprocessor will have already expanded the check macro, or perhaps failed because it had the wrong number of parameters.

--
Rippit the Ogg Frog
email@hidden
http://www.oggfrog.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Newbie post. AssertMacros.h "check" function collides with C++ inline function defined in my namespace (From: email@hidden)

  • Prev by Date: Newbie post. AssertMacros.h "check" function collides with C++ inline function defined in my namespace
  • Next by Date: -framework vs add framework, dynamic search paths
  • Previous by thread: Newbie post. AssertMacros.h "check" function collides with C++ inline function defined in my namespace
  • Next by thread: -framework vs add framework, dynamic search paths
  • Index(es):
    • Date
    • Thread