williamr@2: #ifndef BOOST_SERIALIZATION_FORCE_INCLUDE_HPP williamr@2: #define BOOST_SERIALIZATION_FORCE_INCLUDE_HPP williamr@2: williamr@2: // MS compatible compilers support #pragma once williamr@2: #if defined(_MSC_VER) && (_MSC_VER >= 1020) williamr@2: # pragma once williamr@2: #endif williamr@2: williamr@2: /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 williamr@2: // force_include.hpp: williamr@2: williamr@2: // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . williamr@2: // Use, modification and distribution is subject to the Boost Software williamr@2: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at williamr@2: // http://www.boost.org/LICENSE_1_0.txt) williamr@2: williamr@2: // See http://www.boost.org for updates, documentation, and revision history. williamr@2: williamr@2: // implementation of class export functionality. This is an alternative to williamr@2: // "forward declaration" method to provoke instantiation of derived classes williamr@2: // that are to be serialized through pointers. williamr@2: williamr@2: #include williamr@2: williamr@2: // the following help macro is to guarentee that certain coded williamr@2: // is not removed by over-eager linker optimiser. In certain cases williamr@2: // we create static objects must be created but are actually never williamr@2: // referenced - creation has a side-effect such as global registration williamr@2: // which is important to us. We make an effort to refer these objects williamr@2: // so that a smart linker won't remove them as being unreferenced. williamr@2: // In microsoft compilers, inlining the code that does the referring williamr@2: // means the code gets lost and the static object is not included williamr@2: // in the library and hence never registered. This manifests itself williamr@2: // in an ungraceful crash at runtime when (and only when) built in williamr@2: // release mode. williamr@2: williamr@2: #if defined(BOOST_HAS_DECLSPEC) && !defined(__COMO__) williamr@2: # if defined(__BORLANDC__) williamr@2: # define BOOST_DLLEXPORT __export williamr@2: # else williamr@2: # define BOOST_DLLEXPORT __declspec(dllexport) williamr@2: # endif williamr@2: #elif ! defined(_WIN32) && ! defined(_WIN64) williamr@2: # if defined(__MWERKS__) williamr@2: # // define BOOST_USED __attribute__ ((used)) williamr@2: # elif defined(__GNUC__) && (__GNUC__ >= 3) williamr@2: # define BOOST_USED __attribute__ ((used)) williamr@2: # elif defined(__INTEL_COMPILER) && (BOOST_INTEL_CXX_VERSION >= 800) williamr@2: # define BOOST_USED __attribute__ ((used)) williamr@2: # endif williamr@2: #endif williamr@2: williamr@2: #ifndef BOOST_USED williamr@2: # define BOOST_USED williamr@2: #endif williamr@2: williamr@2: #ifndef BOOST_DLLEXPORT williamr@2: # define BOOST_DLLEXPORT williamr@2: #endif williamr@2: williamr@2: #endif // BOOST_SERIALIZATION_FORCE_INCLUDE_HPP