1 /*=============================================================================
2 Copyright (c) 2001-2003 Joel de Guzman
3 http://spirit.sourceforge.net/
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 =============================================================================*/
8 #if !defined(BOOST_SPIRIT_CONFIG_HPP)
9 #define BOOST_SPIRIT_CONFIG_HPP
11 #include <boost/config.hpp>
13 ///////////////////////////////////////////////////////////////////////////////
17 // Historically, Spirit supported a lot of compilers, including (to some
18 // extent) poorly conforming compilers such as VC6. Spirit v1.6.x will be
19 // the last release that will support older poorly conforming compilers.
20 // Starting from Spirit v1.8.0, ill conforming compilers will not be
21 // supported. If you are still using one of these older compilers, you can
22 // still use Spirit v1.6.x.
24 // The reason why Spirit v1.6.x worked on old non-conforming compilers is
25 // that the authors laboriously took the trouble of searching for
26 // workarounds to make these compilers happy. The process takes a lot of
27 // time and energy, especially when one encounters the dreaded ICE or
28 // "Internal Compiler Error". Sometimes searching for a single workaround
29 // takes days or even weeks. Sometimes, there are no known workarounds. This
30 // stifles progress a lot. And, as the library gets more progressive and
31 // takes on more advanced C++ techniques, the difficulty is escalated to
34 // Spirit v1.6.x will still be supported. Maintenance and bug fixes will
35 // still be applied. There will still be active development for the back-
36 // porting of new features introduced in Spirit v1.8.0 (and Spirit 1.9.0)
37 // to lesser able compilers; hopefully, fueled by contributions from the
38 // community. For instance, there is already a working AST tree back-port
39 // for VC6 and VC7 by Peder Holt.
41 // If you got here somehow, your compiler is known to be poorly conforming
42 // WRT ANSI/ISO C++ standard. Library implementers get a bad reputation when
43 // someone attempts to compile the code on a non-conforming compiler. She'll
44 // be confronted with tons of compiler errors when she tries to compile the
45 // library. Such errors will somehow make less informed users conclude that
46 // the code is poorly written. It's better for the user to see a message
47 // "sorry, this code has not been ported to your compiler yet", than to see
48 // pages and pages of compiler error messages.
50 /////////////////////////////////////////////////////////////////////////////////
51 #if (defined(BOOST_MSVC) && (BOOST_MSVC < 1310)) \
52 || (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) \
53 || (defined(__GNUC__) && (__GNUC__ < 3)) \
54 || (defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ < 1))
55 # error "Compiler not supported. See note in <boost/spirit/core/config.hpp>"
57 // Pass... Compiler supported.