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