Ticket #4763: units_detail_utility.2.patch

File units_detail_utility.2.patch, 747 bytes (added by Michel MORIN <mimomorin@…>, 11 years ago)

A new patch for boost/units/detail/utility.hpp. This patch enables to detect <cxxabi.h> header file when compiling with clang.

  • boost/units/detail/utility.hpp

     
    1515#include <typeinfo>
    1616#include <string>
    1717
    18 #if defined(__GLIBCXX__) || defined(__GLIBCPP__)
    19 #define BOOST_UNITS_USE_DEMANGLING
    20 #include <cxxabi.h>
    21 #endif // __GNUC__
     18#if defined(__has_include)
     19    #if __has_include(<cxxabi.h>)
     20    #define BOOST_UNITS_USE_DEMANGLING
     21    #include <cxxabi.h>
     22    #endif // __clang__
     23#else
     24    #if defined(__GLIBCXX__) || defined(__GLIBCPP__)
     25    #define BOOST_UNITS_USE_DEMANGLING
     26    #include <cxxabi.h>
     27    #endif // __GNUC__
     28#endif
    2229
    2330#ifdef BOOST_UNITS_USE_DEMANGLING
    2431