From f19e192f68a2ebfad5286ab085db925cbd0c65b6 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 18 May 2010 17:55:32 +0000 Subject: [PATCH] Add a BOOST_CLANG macro to indicate when Clang is used. [SVN r62089] --- doc/macro_reference.qbk | 3 +++ include/boost/config/compiler/clang.hpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index ac46a412..0843da53 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -835,6 +835,9 @@ PPPPP is the compiler build number. Defined if the compiler is an Intel compiler, takes the same value as the compiler version macro. ]] +[[`BOOST_CLANG`][``][ +Defined to 1 if the compiler is the Clang compiler. +]] [[`BOOST_WINDOWS`][``][ Defined if the Windows platfrom API is available. ]] diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 53339b4c..e5a682b2 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -69,3 +69,7 @@ #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ #endif + +// Macro used to identify the Clang compiler. +#define BOOST_CLANG 1 +