|
Boost : |
From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-07-18 12:57:56
Hi,
I think that some users (me? :) might want to use BOOST_CURRENT_FUNCTION
only when it contains a meaningful value. Thus, it probably makes sense
to provide BOOST_HAS_CURRENT_FUNCTION (or should it be called
BOOST_PROVIDES_CURRENT_FUNCTION?) to reflect this. A possible
implementation (yeah, pretty easy) is attached, of course the
documentation should be updated if we agree that the patch makes sense.
Comments?
Regards, Daniel
--- current_function.hpp Thu May 22 17:17:30 2003
+++ current_function.hpp.new Fri Jul 18 19:46:41 2003
@@ -9,6 +9,7 @@
// boost/current_function.hpp - BOOST_CURRENT_FUNCTION
//
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2003 Daniel Frey
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
@@ -27,6 +28,8 @@
inline void current_function_helper()
{
+# define BOOST_HAS_CURRENT_FUNCTION
+
#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000))
# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
@@ -46,6 +49,7 @@
#else
# define BOOST_CURRENT_FUNCTION "(unknown)"
+# undef BOOST_HAS_CURRENT_FUNCTION
#endif
-- Daniel Frey aixigo AG - financial training, research and technology Schloß-Rahe-Straße 15, 52072 Aachen, Germany fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99 eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk