source: NonGTP/Boost/boost/serialization/force_include.hpp @ 857

Revision 857, 2.3 KB checked in by igarcia, 19 years ago (diff)
RevLine 
[857]1#ifndef BOOST_SERIALIZATION_FORCE_INCLUDE_HPP
2#define BOOST_SERIALIZATION_FORCE_INCLUDE_HPP
3
4// MS compatible compilers support #pragma once
5#if defined(_MSC_VER) && (_MSC_VER >= 1020)
6# pragma once
7#endif
8
9/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10// force_include.hpp:
11
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)
16
17//  See http://www.boost.org for updates, documentation, and revision history.
18
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.
22
23#include <boost/config.hpp>
24
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
35// release mode.
36
37#if defined(BOOST_HAS_DECLSPEC) && !defined(__COMO__)
38#   if defined(__BORLANDC__)
39#       define BOOST_DLLEXPORT __export
40#   else
41#       define BOOST_DLLEXPORT __declspec(dllexport)
42#   endif
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))
50#   endif
51#endif
52
53#ifndef BOOST_USED
54#    define BOOST_USED
55#endif
56
57#ifndef BOOST_DLLEXPORT
58#    define BOOST_DLLEXPORT
59#endif
60
61#endif // BOOST_SERIALIZATION_FORCE_INCLUDE_HPP
Note: See TracBrowser for help on using the repository browser.