Re: [Libmesh-users] Suggestion: turn some macros into functions

2021-03-31 Thread edgar
On 2021-03-31 13:32, John Peterson wrote: Hi Edgar, Yes, clearly something like this will work: libmesh_example_requires_fun(bool (0), "TESTME", __FILE__, __LINE__); but you then force the user

Re: [Libmesh-users] Suggestion: turn some macros into functions

2021-03-31 Thread John Peterson
Hi Edgar, Yes, clearly something like this will work: libmesh_example_requires_fun(bool (0), > "TESTME", > __FILE__, > __LINE__); but you then force the user to manually pass __FILE__ and __LINE__

Re: [Libmesh-users] Suggestion: turn some macros into functions

2021-03-30 Thread edgar
On 2021-03-31 02:01, edgar wrote: Dear John, --- 8< --- │ #endif /* LIBMESH_MACRO_HANDLER_H */ └ Listing 2: header file (libmesh_macro_handle.h). Note that `libmesh_example_requires_fun' could have also been `int', but I modified it to show a stack trace too. --- 8< --- │ } └ Listing

Re: [Libmesh-users] Suggestion: turn some macros into functions

2021-03-30 Thread edgar
On 2021-03-22 19:26, edgar wrote: > On 2021-03-22 18:26, John Peterson wrote: >> The main reason that libmesh_error_msg() and friends are macros is that >> they use the __FILE__ and __LINE__ preprocessor defines to help direct the >> user to the exact place in the code where the error was triggere

Re: [Libmesh-users] Suggestion: turn some macros into functions

2021-03-22 Thread edgar
On 2021-03-22 18:26, John Peterson wrote: The main reason that libmesh_error_msg() and friends are macros is that they use the __FILE__ and __LINE__ preprocessor defines to help direct the user to the exact place in the code where the error was triggered. I'm not sure if it is possible to do th

Re: [Libmesh-users] Suggestion: turn some macros into functions

2021-03-22 Thread edgar
Hi Edgar, I don't think this mailing list --8<-- accept{s} attachments. I live in a bubble :P . Second best would be to paste a diff into the body of an email (assuming it's not too long, in which case the first option should be used). Third best: create a fork on notabug.org or GNU Savan

Re: [Libmesh-users] Suggestion: turn some macros into functions

2021-03-22 Thread John Peterson
On Mon, Mar 22, 2021 at 1:10 PM wrote: > > Hi Edgar, > > > > I don't think this mailing list --8<-- accept{s} attachments. > > I live in a bubble :P . > > > Second best would be to paste a diff into > > the body of an email (assuming it's not too long, in which case the > > first > > option shoul

Re: [Libmesh-users] Suggestion: turn some macros into functions

2021-03-22 Thread John Peterson
On Fri, Mar 19, 2021 at 11:40 AM wrote: > I am sorry, but my e-mail provider refuses to send my mesage as plain > text. I am thus attaching a compressed file in the hope that it reaches > you. > Hi Edgar, I don't think this mailing list requires plain text messages (though I could be wrong abou

[Libmesh-users] Suggestion: turn some macros into functions

2021-03-19 Thread edgar
I am sorry, but my e-mail provider refuses to send my mesage as plain text. I am thus attaching a compressed file in the hope that it reaches you. - This free account was provided by VFEmail.net - report spam to ab...@vfemail.net ONLY AT VFEmail!