Boost logo

Boost :

From: Jens Seidel (jensseidel_at_[hidden])
Date: 2007-11-10 05:21:14


On Sat, Nov 10, 2007 at 06:42:50AM +0200, John Torjo wrote:
> Applied your patch. Thanks!

Thanks, it was only a very very trivial one.

>
> #else
>
> +#ifdef BOOST_LOG_TSS_USE_CUSTOM
> // in case the user specified a custom class, maybe he specified its name as well
> #define BOOST_LOG_TSS_DEFAULT_CLASS BOOST_LOG_TSS_USE_CUSTOM
> +
> +#else
> +
> +// use internal implementation
> +#include <boost/logging/detail/tss/tss_impl.hpp>
> +#define BOOST_LOG_TSS_DEFAULT_CLASS = ::boost::logging::thread_specific_ptr
> +
> #endif
>
> +#endif
> +
>
>
> ----> note : no need, I do this on macros.hpp (define BOOST_LOG_TSS_USE_CUSTOM if none is defined)

Compiling only boost/logging/macros.hpp with a trivial main() results in:

In file included from ~/Boost/svn/logging/boost/logging/detail/ts/ts_resource.hpp:25,
|| from ~/Boost/svn/logging/boost/logging/detail/fwd.hpp:25,
|| from ~/Boost/svn/logging/boost/logging/macros.hpp:24,
|| from /tmp/testPDXvVD.cpp:1:
~/Boost/svn/logging/boost/logging/detail/tss/tss.hpp|58| error: expected '>' before 'BOOST_LOG_TSS_USE_CUSTOM'
|| In file included from ~/Boost/svn/logging/boost/logging/detail/fwd.hpp:25,
|| from ~/Boost/svn/logging/boost/logging/macros.hpp:24,
|| from /tmp/testPDXvVD.cpp:1:
~/Boost/svn/logging/boost/logging/detail/ts/ts_resource.hpp|220| error: wrong number of template arguments (1, should be 2)
~/Boost/svn/logging/boost/logging/detail/tss/tss.hpp|58| error: provided for 'template<class type, template<class> class thread_specific_ptr_type> struct boost::logging::tss_value'
~/Boost/svn/logging/boost/logging/detail/ts/ts_resource.hpp|293| error: wrong number of template arguments (1, should be 2)
~/Boost/svn/logging/boost/logging/detail/tss/tss.hpp|58| error: provided for 'template<class type, template<class> class thread_specific_ptr_type> struct boost::logging::tss_value'

Please note that the error occurs from the include in line 24 of macros.hpp
*before* you define BOOST_LOG_TSS_USE_CUSTOM. So any file included in
macros.hpp depends itself from macros.hpp.

Further error:

~/Boost/svn/logging/boost/logging/tags.hpp: In member function 'const tag_type& boost::logging::tag_holder<string_, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10>::get_tag() const':
~/Boost/svn/logging/boost/logging/tags.hpp|93| error: there are no arguments to 'operator const tag_type&' that depend on a template parameter, so a declaration of 'operator const tag_type&' must be available
~/Boost/svn/logging/boost/logging/tags.hpp|93| error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)

Jens


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk