macros

Determination of type in function template

Hi all! I would like to ask you for an advice about function template. I have a function that adds some data into buffer. But I need also to add an information about data type into the buffer. The type of data is a following enum: enum ParameterType { UINT, FLOAT, DOUBLE }; And I need to create a function template from funct...

Custom IExtensibility2-based Outlook AddIn silently not loading when macro security turned on.

Hi gang, We have a custom IExtensibility2-based Outlook AddIn that runs in Outlook 2003, 2007, and 2010 (i.e. we're not using VSTO). In most cases, the AddIn loads and runs fine, but if the user turns on the "Apply macro security settings to installed add-ins" setting (via Tools->Trust Center->Add-ins), then our AddIn is silently not ...

Clojure macros and symbol binding

not sure how to express this.. I've written a macro which takes two arguments. The first one essentially contains identifiers for generating a let expression. The second is the code to use inside the let expression (it wants to have access to these identifiers). An example: (match (Add {ast-> x}) (println x)) When the second argumen...

Wrong value of variable LIBS generated by a macro

Hi, I've autoconfiscated a project that link against libresolv and libtpthread, and optionally against ssl, mysqlclient and pq. I am working on Fedora 13 (i686). I've found a macro AX_EXT_HAVE_LIB (http://www.gnu.org/software/autoconf-archive/ax_ext_have_lib.html) that "is identical to AC_SEARCH_LIBS with the exception that will add -L...

ARRAYSIZE C++ macro: how does it work?

OK, I'm not entirely a newbie, but I cannot say I understand the following macro. The most confusing part is the division with value cast to size_t: what on earth does that accomplish? Especially, since I see a negation operator, which, as far as I know, might result in a zero value. Does not this mean that it can lead to a division-by-z...