simplifing visibility/autolink

This commit is contained in:
Robert Ramey
2015-03-23 13:20:05 -07:00
parent 1baeb11a7f
commit 7067bdb263
14 changed files with 35 additions and 48 deletions

View File

@@ -21,7 +21,6 @@
#include <string>
#include <boost/config.hpp>
#include <boost/preprocessor/empty.hpp>
#include <boost/archive/detail/decl.hpp>
// note: the only reason this is in here is that windows header

View File

@@ -30,9 +30,9 @@
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ARCHIVE_DYN_LINK)
// export if this is our own source, otherwise import:
#ifdef BOOST_ARCHIVE_SOURCE
# define BOOST_ARCHIVE_DECL __declspec(dllexport)
# define BOOST_ARCHIVE_DECL BOOST_SYMBOL_EXPORT
#else
# define BOOST_ARCHIVE_DECL __declspec(dllimport)
# define BOOST_ARCHIVE_DECL BOOST_SYMBOL_IMPORT
#endif // BOOST_ARCHIVE_SOURCE
#endif // DYN_LINK
#endif // BOOST_HAS_DECLSPEC

View File

@@ -22,7 +22,6 @@
// http://www.boost.org/more/separate_compilation.html
#include <boost/config.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#if defined(BOOST_HAS_DECLSPEC)
#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK))

View File

@@ -20,7 +20,6 @@
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/preprocessor/empty.hpp>
#include <boost/archive/detail/decl.hpp>
#include <boost/archive/archive_exception.hpp>

View File

@@ -17,7 +17,6 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
// note: this version incorporates the related code into the the
// the same library as BOOST_ARCHIVE. This could change some day in the
@@ -39,24 +38,16 @@
#endif
// export if this is our own source, otherwise import:
#if defined(BOOST_SERIALIZATION_SOURCE)
#if defined(__BORLANDC__)
#define BOOST_SERIALIZATION_DECL(T) T __export
#else
#define BOOST_SERIALIZATION_DECL(T) __declspec(dllexport) T
#endif
#define BOOST_SERIALIZATION_DECL BOOST_SYMBOL_EXPORT
#else
#if defined(__BORLANDC__)
#define BOOST_SERIALIZATION_DECL(T) T __import
#else
#define BOOST_SERIALIZATION_DECL(T) __declspec(dllimport) T
#endif
#define BOOST_SERIALIZATION_DECL BOOST_SYMBOL_IMPORT
#endif // defined(BOOST_SERIALIZATION_SOURCE)
#endif // defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
#endif // BOOST_HAS_DECLSPEC
// if BOOST_SERIALIZATION_DECL isn't defined yet define it now:
#ifndef BOOST_SERIALIZATION_DECL
#define BOOST_SERIALIZATION_DECL(T) T
#define BOOST_SERIALIZATION_DECL
#endif
// enable automatic library variant selection ------------------------------//

View File

@@ -41,7 +41,7 @@ namespace void_cast_detail{
class void_caster;
}
class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info :
class BOOST_SERIALIZATION_DECL extended_type_info :
private boost::noncopyable
{
private:

View File

@@ -52,7 +52,7 @@ namespace no_rtti_system {
// common base class to share type_info_key. This is used to
// identify the method used to keep track of the extended type
class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info_no_rtti_0 :
class BOOST_SERIALIZATION_DECL extended_type_info_no_rtti_0 :
public extended_type_info
{
protected:

View File

@@ -49,7 +49,7 @@ namespace boost {
namespace serialization {
namespace typeid_system {
class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) extended_type_info_typeid_0 :
class BOOST_SERIALIZATION_DECL extended_type_info_typeid_0 :
public extended_type_info
{
virtual const char * get_debug_info() const {

View File

@@ -21,7 +21,6 @@
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/comparison/greater.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
namespace std{
#if defined(__LIBCOMO__)

View File

@@ -47,7 +47,7 @@ class extended_type_info;
// Return the altered pointer. If there exists no sequence of casts that
// can transform from_type to to_type, return a NULL.
BOOST_SERIALIZATION_DECL(void const *)
BOOST_SERIALIZATION_DECL void const *
void_upcast(
extended_type_info const & derived,
extended_type_info const & base,
@@ -67,7 +67,7 @@ void_upcast(
));
}
BOOST_SERIALIZATION_DECL(void const *)
BOOST_SERIALIZATION_DECL void const *
void_downcast(
extended_type_info const & derived,
extended_type_info const & base,
@@ -89,18 +89,18 @@ void_downcast(
namespace void_cast_detail {
class BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) void_caster :
class BOOST_SERIALIZATION_DECL void_caster :
private boost::noncopyable
{
friend
BOOST_SERIALIZATION_DECL(void const *)
BOOST_SERIALIZATION_DECL void const *
boost::serialization::void_upcast(
extended_type_info const & derived,
extended_type_info const & base,
void const * const
);
friend
BOOST_SERIALIZATION_DECL(void const *)
BOOST_SERIALIZATION_DECL void const *
boost::serialization::void_downcast(
extended_type_info const & derived,
extended_type_info const & base,

View File

@@ -110,14 +110,14 @@ public:
} // namespace detail
BOOST_SERIALIZATION_DECL(void)
BOOST_SERIALIZATION_DECL void
extended_type_info::key_register() const{
if(NULL == get_key())
return;
singleton<detail::ktmap>::get_mutable_instance().insert(this);
}
BOOST_SERIALIZATION_DECL(void)
BOOST_SERIALIZATION_DECL void
extended_type_info::key_unregister() const{
if(NULL == get_key())
return;
@@ -135,7 +135,7 @@ extended_type_info::key_unregister() const{
}
}
BOOST_SERIALIZATION_DECL(const extended_type_info *)
BOOST_SERIALIZATION_DECL const extended_type_info *
extended_type_info::find(const char *key) {
BOOST_ASSERT(NULL != key);
const detail::ktmap & k = singleton<detail::ktmap>::get_const_instance();
@@ -146,7 +146,7 @@ extended_type_info::find(const char *key) {
return *(it);
}
BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())
BOOST_SERIALIZATION_DECL
extended_type_info::extended_type_info(
const unsigned int type_info_key,
const char * key
@@ -156,11 +156,11 @@ extended_type_info::extended_type_info(
{
}
BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())
BOOST_SERIALIZATION_DECL
extended_type_info::~extended_type_info(){
}
BOOST_SERIALIZATION_DECL(bool)
BOOST_SERIALIZATION_DECL bool
extended_type_info::operator<(const extended_type_info &rhs) const {
// short cut for a common cases
if(this == & rhs)
@@ -173,7 +173,7 @@ extended_type_info::operator<(const extended_type_info &rhs) const {
return false;
}
BOOST_SERIALIZATION_DECL(bool)
BOOST_SERIALIZATION_DECL bool
extended_type_info::operator==(const extended_type_info &rhs) const {
// short cut for a common cases
if(this == & rhs)

View File

@@ -27,14 +27,14 @@ namespace boost {
namespace serialization {
namespace no_rtti_system {
BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())
BOOST_SERIALIZATION_DECL
extended_type_info_no_rtti_0::extended_type_info_no_rtti_0(
const char * key
) :
extended_type_info(EXTENDED_TYPE_INFO_NO_RTTI_KEY, key)
{}
BOOST_SERIALIZATION_DECL(bool)
BOOST_SERIALIZATION_DECL bool
extended_type_info_no_rtti_0::is_less_than(
const boost::serialization::extended_type_info &rhs) const
{
@@ -57,7 +57,7 @@ extended_type_info_no_rtti_0::is_less_than(
return std::strcmp(l, r) < 0;
}
BOOST_SERIALIZATION_DECL(bool)
BOOST_SERIALIZATION_DECL bool
extended_type_info_no_rtti_0::is_equal(
const boost::serialization::extended_type_info &rhs) const
{
@@ -76,7 +76,7 @@ extended_type_info_no_rtti_0::is_equal(
return 0 == std::strcmp(l, r);
}
BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())
BOOST_SERIALIZATION_DECL
extended_type_info_no_rtti_0::~extended_type_info_no_rtti_0()
{}

View File

@@ -44,7 +44,7 @@ typedef std::multiset<
type_compare
> tkmap;
BOOST_SERIALIZATION_DECL(bool)
BOOST_SERIALIZATION_DECL bool
extended_type_info_typeid_0::is_less_than(
const boost::serialization::extended_type_info & rhs
) const {
@@ -56,7 +56,7 @@ extended_type_info_typeid_0::is_less_than(
);
}
BOOST_SERIALIZATION_DECL(bool)
BOOST_SERIALIZATION_DECL bool
extended_type_info_typeid_0::is_equal(
const boost::serialization::extended_type_info & rhs
) const {
@@ -70,7 +70,7 @@ extended_type_info_typeid_0::is_equal(
;
}
BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())
BOOST_SERIALIZATION_DECL
extended_type_info_typeid_0::extended_type_info_typeid_0(
const char * key
) :
@@ -78,17 +78,17 @@ extended_type_info_typeid_0::extended_type_info_typeid_0(
m_ti(NULL)
{}
BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())
BOOST_SERIALIZATION_DECL
extended_type_info_typeid_0::~extended_type_info_typeid_0()
{}
BOOST_SERIALIZATION_DECL(void)
BOOST_SERIALIZATION_DECL void
extended_type_info_typeid_0::type_register(const std::type_info & ti){
m_ti = & ti;
singleton<tkmap>::get_mutable_instance().insert(this);
}
BOOST_SERIALIZATION_DECL(void)
BOOST_SERIALIZATION_DECL void
extended_type_info_typeid_0::type_unregister()
{
if(NULL != m_ti){
@@ -144,7 +144,7 @@ public:
# pragma warning(pop)
#endif
BOOST_SERIALIZATION_DECL(const extended_type_info *)
BOOST_SERIALIZATION_DECL const extended_type_info *
extended_type_info_typeid_0::get_extended_type_info(
const std::type_info & ti
) const {

View File

@@ -212,7 +212,7 @@ public:
#endif
// implementation of void caster base class
BOOST_SERIALIZATION_DECL(void)
BOOST_SERIALIZATION_DECL void
void_caster::recursive_register(bool includes_virtual_base) const {
void_cast_detail::set_type & s
= void_cast_detail::void_caster_registry::get_mutable_instance();
@@ -270,7 +270,7 @@ void_caster::recursive_register(bool includes_virtual_base) const {
}
}
BOOST_SERIALIZATION_DECL(void)
BOOST_SERIALIZATION_DECL void
void_caster::recursive_unregister() const {
if(void_caster_registry::is_destroyed())
return;
@@ -310,7 +310,7 @@ void_caster::recursive_unregister() const {
// and alter it so that it would point to an instance of a related type.
// Return the altered pointer. If there exists no sequence of casts that
// can transform from_type to to_type, return a NULL.
BOOST_SERIALIZATION_DECL(void const *)
BOOST_SERIALIZATION_DECL void const *
void_upcast(
extended_type_info const & derived,
extended_type_info const & base,
@@ -333,7 +333,7 @@ void_upcast(
return NULL;
}
BOOST_SERIALIZATION_DECL(void const *)
BOOST_SERIALIZATION_DECL void const *
void_downcast(
extended_type_info const & derived,
extended_type_info const & base,