|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85986 - in branches/release: boost/log boost/log/attributes boost/log/detail boost/log/expressions/formatters boost/log/utility libs/log libs/log/doc libs/log/src
From: andrey.semashev_at_[hidden]
Date: 2013-09-28 12:11:45
Author: andysem
Date: 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013)
New Revision: 85986
URL: http://svn.boost.org/trac/boost/changeset/85986
Log:
Merged latest changes from trunk.
Properties modified:
branches/release/boost/log/ (props changed)
branches/release/libs/log/ (props changed)
Text files modified:
branches/release/boost/log/attributes/attribute_value_set.hpp | 1 +
branches/release/boost/log/detail/config.hpp | 20 +++++---------------
branches/release/boost/log/detail/spin_mutex.hpp | 4 ++--
branches/release/boost/log/expressions/formatters/named_scope.hpp | 13 ++++++++++---
branches/release/boost/log/utility/unique_identifier_name.hpp | 9 ++++-----
branches/release/libs/log/doc/changelog.qbk | 2 +-
branches/release/libs/log/doc/log.qbk | 1 +
branches/release/libs/log/src/attribute_name.cpp | 2 +-
branches/release/libs/log/src/default_attribute_names.cpp | 2 +-
branches/release/libs/log/src/default_sink.cpp | 6 +++++-
branches/release/libs/log/src/filter_parser.cpp | 2 +-
branches/release/libs/log/src/formatter_parser.cpp | 2 +-
branches/release/libs/log/src/init_from_settings.cpp | 2 +-
branches/release/libs/log/src/named_scope_format_parser.cpp | 26 ++++++++++++++++----------
branches/release/libs/log/src/text_file_backend.cpp | 2 +-
15 files changed, 51 insertions(+), 43 deletions(-)
Modified: branches/release/boost/log/attributes/attribute_value_set.hpp
==============================================================================
--- branches/release/boost/log/attributes/attribute_value_set.hpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/boost/log/attributes/attribute_value_set.hpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -95,6 +95,7 @@
private:
struct implementation;
+ friend struct implementation;
//! A base class for the container nodes
struct node_base
Modified: branches/release/boost/log/detail/config.hpp
==============================================================================
--- branches/release/boost/log/detail/config.hpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/boost/log/detail/config.hpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -53,8 +53,8 @@
# define BOOST_LOG_BROKEN_TEMPLATE_DEFINITION_MATCHING
# endif
# if _MSC_VER <= 1400
- // Older MSVC versions reject friend declarations for class template instantiations
-# define BOOST_LOG_BROKEN_FRIEND_TEMPLATE_INSTANTIATIONS
+ // Older MSVC versions reject friend declarations for class template specializations
+# define BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS
# endif
# if _MSC_VER <= 1600
// MSVC up to 10.0 attempts to invoke copy constructor when initializing a const reference from rvalue returned from a function.
@@ -78,8 +78,8 @@
# endif
#endif
-#if defined(BOOST_INTEL)
- // Intel compiler has problems with friend declarations for member classes
+#if defined(BOOST_INTEL) || defined(__SUNPRO_CC)
+ // Intel compiler and Sun Studio 12.3 have problems with friend declarations for nested class templates
# define BOOST_LOG_NO_MEMBER_TEMPLATE_FRIENDS
#endif
@@ -99,16 +99,6 @@
# endif
#endif
-#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
- // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
-# define BOOST_LOG_NO_UNSPECIFIED_BOOL
-#endif // (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
-
-#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1))
- // GCC 4.0.0 (and probably older) can't cope with some optimizations regarding string literals
-# define BOOST_LOG_BROKEN_STRING_LITERALS
-#endif
-
#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)
// GCC 4.1 and 4.2 have buggy anonymous namespaces support, which interferes with symbol linkage
# define BOOST_LOG_ANONYMOUS_NAMESPACE namespace anonymous {} using namespace anonymous; namespace anonymous
@@ -154,7 +144,7 @@
// Some compilers support a special attribute that shows that a function won't return
#if defined(__GNUC__) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
- // GCC and (supposedly) Sun Studio 12 support attribute syntax
+ // GCC and Sun Studio 12 support attribute syntax
# define BOOST_LOG_NORETURN __attribute__((noreturn))
#elif defined (_MSC_VER)
// Microsoft-compatible compilers go here
Modified: branches/release/boost/log/detail/spin_mutex.hpp
==============================================================================
--- branches/release/boost/log/detail/spin_mutex.hpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/boost/log/detail/spin_mutex.hpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -78,8 +78,8 @@
# define BOOST_LOG_PAUSE_OP _mm_pause()
# endif
# if defined(__INTEL_COMPILER)
-# define BOOST_LOG_COMPILER_BARRIER __asm { nop }
-# elif _MSC_VER >= 1310
+# define BOOST_LOG_COMPILER_BARRIER __memory_barrier()
+# else
extern "C" void _ReadWriteBarrier(void);
#pragma intrinsic(_ReadWriteBarrier)
# define BOOST_LOG_COMPILER_BARRIER _ReadWriteBarrier()
Modified: branches/release/boost/log/expressions/formatters/named_scope.hpp
==============================================================================
--- branches/release/boost/log/expressions/formatters/named_scope.hpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/boost/log/expressions/formatters/named_scope.hpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -71,10 +71,17 @@
namespace aux {
+#ifdef BOOST_LOG_USE_CHAR
//! Parses the named scope format string and constructs the formatter function
-template< typename CharT >
-BOOST_LOG_API boost::log::aux::light_function< void (basic_formatting_ostream< CharT >&, attributes::named_scope::value_type::value_type const&) >
-parse_named_scope_format(const CharT* begin, const CharT* end);
+BOOST_LOG_API boost::log::aux::light_function< void (basic_formatting_ostream< char >&, attributes::named_scope::value_type::value_type const&) >
+parse_named_scope_format(const char* begin, const char* end);
+#endif
+
+#ifdef BOOST_LOG_USE_WCHAR_T
+//! Parses the named scope format string and constructs the formatter function
+BOOST_LOG_API boost::log::aux::light_function< void (basic_formatting_ostream< wchar_t >&, attributes::named_scope::value_type::value_type const&) >
+parse_named_scope_format(const wchar_t* begin, const wchar_t* end);
+#endif
//! Parses the named scope format string and constructs the formatter function
template< typename CharT >
Modified: branches/release/boost/log/utility/unique_identifier_name.hpp
==============================================================================
--- branches/release/boost/log/utility/unique_identifier_name.hpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/boost/log/utility/unique_identifier_name.hpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -9,13 +9,12 @@
* \author Andrey Semashev
* \date 30.04.2008
*
- * The header contains BOOST_LOG_UNIQUE_IDENTIFIER_NAME macro definition.
+ * The header contains \c BOOST_LOG_UNIQUE_IDENTIFIER_NAME macro definition.
*/
#ifndef BOOST_LOG_UTILITY_UNIQUE_IDENTIFIER_NAME_HPP_INCLUDED_
#define BOOST_LOG_UTILITY_UNIQUE_IDENTIFIER_NAME_HPP_INCLUDED_
-#include <boost/detail/workaround.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/log/detail/config.hpp>
@@ -37,16 +36,16 @@
*
* Constructs a unique (in the current file scope) token that can be used as a variable name.
* The name will contain a prefix passed in the \a prefix argument. This allows to use the
- * macro multiple times in another macro.
+ * macro multiple times on a single line.
*/
// In VC 7.0 and later when compiling with /ZI option __LINE__ macro is corrupted
-#if BOOST_WORKAROUND(BOOST_MSVC, >=1300)
+#ifdef BOOST_MSVC
# define BOOST_LOG_UNIQUE_IDENTIFIER_NAME(prefix)\
BOOST_LOG_UNIQUE_IDENTIFIER_NAME_INTERNAL(prefix, __COUNTER__)
#else
# define BOOST_LOG_UNIQUE_IDENTIFIER_NAME(prefix)\
BOOST_LOG_UNIQUE_IDENTIFIER_NAME_INTERNAL(prefix, __LINE__)
-#endif // BOOST_WORKAROUND(BOOST_MSVC, >= 1300)
+#endif // BOOST_MSVC
#endif // BOOST_LOG_UTILITY_UNIQUE_IDENTIFIER_NAME_HPP_INCLUDED_
Modified: branches/release/libs/log/doc/changelog.qbk
==============================================================================
--- branches/release/libs/log/doc/changelog.qbk Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/doc/changelog.qbk 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -24,7 +24,7 @@
* Fixed [link log.detailed.attributes.timer `timer`] attribute generating incorrect time readings on Windows on heavy thread contention when `QueryPerformanceCounter` API was used.
* Fixed a bug in the filter parser that prevented using parsed filters with some attributes. For example, parsed filters didn't work with a string-typed attribute value, if the value was compared to a numeric operand.
* Fixed thread id formatting discrepancies between the default sink and formatters.
-* Closed tickets: [ticket 8815], [ticket 8819], [ticket 8915], [ticket 8917].
+* Closed tickets: [ticket 8815], [ticket 8819], [ticket 8915], [ticket 8917], [ticket 9139], [ticket 9140], [ticket 9153], [ticket 9155].
[heading 2.1, Boost 1.54]
Modified: branches/release/libs/log/doc/log.qbk
==============================================================================
--- branches/release/libs/log/doc/log.qbk Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/doc/log.qbk 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -166,6 +166,7 @@
* MSVC 8.0 (without SP1) and older.
* GCC 4.0 and older.
* Borland C++ 5.5.1 (free version). Newer versions might or might not work.
+* Solaris Studio 12.3 and older.
* Windows 9x, ME, NT4 and older are not supported.
Boost.Log should be compatible with all hardware architectures supported by Boost. However, in case of 32 bit x86 architecture the library requires at least i586 class CPU to run.
Modified: branches/release/libs/log/src/attribute_name.cpp
==============================================================================
--- branches/release/libs/log/src/attribute_name.cpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/src/attribute_name.cpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -49,7 +49,7 @@
shared_ptr< repository >
> base_type;
-#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_INSTANTIATIONS)
+#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS)
friend class log::aux::lazy_singleton<
repository,
shared_ptr< repository >
Modified: branches/release/libs/log/src/default_attribute_names.cpp
==============================================================================
--- branches/release/libs/log/src/default_attribute_names.cpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/src/default_attribute_names.cpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -34,7 +34,7 @@
private:
typedef lazy_singleton< names, shared_ptr< names > > base_type;
-#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_INSTANTIATIONS)
+#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS)
friend class lazy_singleton< names, shared_ptr< names > >;
#else
friend class base_type;
Modified: branches/release/libs/log/src/default_sink.cpp
==============================================================================
--- branches/release/libs/log/src/default_sink.cpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/src/default_sink.cpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -31,6 +31,8 @@
BOOST_LOG_OPEN_NAMESPACE
+#if !defined(BOOST_LOG_NO_THREADS)
+
namespace aux {
// Defined in thread_id.cpp
@@ -38,6 +40,8 @@
} // namespace aux
+#endif // !defined(BOOST_LOG_NO_THREADS)
+
namespace sinks {
namespace aux {
@@ -210,7 +214,7 @@
void default_sink::flush()
{
BOOST_LOG_EXPR_IF_MT(lock_guard< mutex_type > lock(m_mutex);)
- fflush(stdout);
+ std::fflush(stdout);
}
} // namespace aux
Modified: branches/release/libs/log/src/filter_parser.cpp
==============================================================================
--- branches/release/libs/log/src/filter_parser.cpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/src/filter_parser.cpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -73,7 +73,7 @@
typedef std::map< attribute_name, shared_ptr< filter_factory_type >, attribute_name_order > factories_map;
-#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_INSTANTIATIONS)
+#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS)
friend class log::aux::lazy_singleton< filters_repository< char_type > >;
#else
friend class base_type;
Modified: branches/release/libs/log/src/formatter_parser.cpp
==============================================================================
--- branches/release/libs/log/src/formatter_parser.cpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/src/formatter_parser.cpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -61,7 +61,7 @@
//! Base class type
typedef log::aux::lazy_singleton< formatters_repository< CharT > > base_type;
-#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_INSTANTIATIONS)
+#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS)
friend class log::aux::lazy_singleton< formatters_repository< CharT > >;
#else
friend class base_type;
Modified: branches/release/libs/log/src/init_from_settings.cpp
==============================================================================
--- branches/release/libs/log/src/init_from_settings.cpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/src/init_from_settings.cpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -603,7 +603,7 @@
{
typedef log::aux::lazy_singleton< sinks_repository< CharT > > base_type;
-#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_INSTANTIATIONS)
+#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS)
friend class log::aux::lazy_singleton< sinks_repository< CharT > >;
#else
friend class base_type;
Modified: branches/release/libs/log/src/named_scope_format_parser.cpp
==============================================================================
--- branches/release/libs/log/src/named_scope_format_parser.cpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/src/named_scope_format_parser.cpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -151,12 +151,10 @@
}
};
-} // namespace
-
//! Parses the named scope format string and constructs the formatter function
template< typename CharT >
-boost::log::aux::light_function< void (basic_formatting_ostream< CharT >&, attributes::named_scope::value_type::value_type const&) >
-parse_named_scope_format(const CharT* begin, const CharT* end)
+BOOST_FORCEINLINE boost::log::aux::light_function< void (basic_formatting_ostream< CharT >&, attributes::named_scope::value_type::value_type const&) >
+do_parse_named_scope_format(const CharT* begin, const CharT* end)
{
typedef CharT char_type;
typedef boost::log::aux::light_function< void (basic_formatting_ostream< char_type >&, attributes::named_scope::value_type::value_type const&) > result_type;
@@ -217,20 +215,28 @@
return result_type(boost::move(fmt));
}
+} // namespace
+
#ifdef BOOST_LOG_USE_CHAR
-template BOOST_LOG_API
-boost::log::aux::light_function< void (basic_formatting_ostream< char >&, attributes::named_scope::value_type::value_type const&) >
-parse_named_scope_format(const char* begin, const char* end);
+//! Parses the named scope format string and constructs the formatter function
+BOOST_LOG_API boost::log::aux::light_function< void (basic_formatting_ostream< char >&, attributes::named_scope::value_type::value_type const&) >
+parse_named_scope_format(const char* begin, const char* end)
+{
+ return do_parse_named_scope_format(begin, end);
+}
#endif // BOOST_LOG_USE_CHAR
#ifdef BOOST_LOG_USE_WCHAR_T
-template BOOST_LOG_API
-boost::log::aux::light_function< void (basic_formatting_ostream< wchar_t >&, attributes::named_scope::value_type::value_type const&) >
-parse_named_scope_format(const wchar_t* begin, const wchar_t* end);
+//! Parses the named scope format string and constructs the formatter function
+BOOST_LOG_API boost::log::aux::light_function< void (basic_formatting_ostream< wchar_t >&, attributes::named_scope::value_type::value_type const&) >
+parse_named_scope_format(const wchar_t* begin, const wchar_t* end)
+{
+ return do_parse_named_scope_format(begin, end);
+}
#endif // BOOST_LOG_USE_WCHAR_T
Modified: branches/release/libs/log/src/text_file_backend.cpp
==============================================================================
--- branches/release/libs/log/src/text_file_backend.cpp Sat Sep 28 12:06:40 2013 (r85985)
+++ branches/release/libs/log/src/text_file_backend.cpp 2013-09-28 12:11:45 EDT (Sat, 28 Sep 2013) (r85986)
@@ -571,7 +571,7 @@
//! Base type
typedef log::aux::lazy_singleton< file_collector_repository, shared_ptr< file_collector_repository > > base_type;
-#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_INSTANTIATIONS)
+#if !defined(BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS)
friend class log::aux::lazy_singleton< file_collector_repository, shared_ptr< file_collector_repository > >;
#else
friend class base_type;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk