]> git.saurik.com Git - wxWidgets.git/commitdiff
documented wxCOMPILE_TIME_ASSERT2
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 7 Feb 2002 12:53:34 +0000 (12:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 7 Feb 2002 12:53:34 +0000 (12:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/function.tex

index 48c0b6e448b5595a417f966fe2e3dcc7b1cb1d85..35eeebcb3ee44e066b672640d1583391008afef1 100644 (file)
@@ -41,6 +41,7 @@ the corresponding topic.
 \helpref{wxCloseClipboard}{wxcloseclipboard}\\
 \helpref{wxColourDisplay}{wxcolourdisplay}\\
 \helpref{wxCOMPILE\_TIME\_ASSERT}{wxcompiletimeassert}\\
+\helpref{wxCOMPILE\_TIME\_ASSERT2}{wxcompiletimeassert2}\\
 \helpref{wxConcatFiles}{wxconcatfiles}\\
 \helpref{wxConstCast}{wxconstcast}\\
 \helpref{wxCopyFile}{wxcopyfile}\\
@@ -3406,11 +3407,26 @@ This macro is mostly useful for testing the expressions involing the
 {\tt sizeof} operator as they can't be tested by the preprocessor but it is
 sometimes desirable to test them at the compile time.
 
+Note that this macro internally declares a struct whose name it tries to make
+unique by using the {\tt \_\_LINE\_\_} in it but it may still not work if you
+use it on the same line in two different source files. In this case you may
+either change the line in which either of them appears on or use the 
+\helpref{wxCOMPILE\_TIME\_ASSERT2}{wxcompiletimeassert2} macro.
+
 \wxheading{See also}
 
 \helpref{wxASSERT\_MSG}{wxassertmsg},\\
 \helpref{wxASSERT\_MIN\_BITSIZE}{wxassertminbitsize}
 
+\membersection{wxCOMPILE\_TIME\_ASSERT2}\label{wxcompiletimeassert2}
+
+\func{}{wxCOMPILE\_TIME\_ASSERT}{\param{}{condition}, \param{}{msg}, \param{}{name}}
+
+This macro is identical to \helpref{wxCOMPILE\_TIME\_ASSERT2}{wxcompiletimeassert2} 
+except that it allows you to specify a unique {\it name} for the struct
+internally defined by this macro to avoid getting the compilation errors
+described \helpref{above}{wxcompiletimeassert}.
+
 \membersection{wxFAIL}\label{wxfail}
 
 \func{}{wxFAIL}{\void}