]> git.saurik.com Git - apple/icu.git/blame - icuSources/common/utypeinfo.h
ICU-59173.0.1.tar.gz
[apple/icu.git] / icuSources / common / utypeinfo.h
CommitLineData
f3c0d7a5
A
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
51004dcb
A
3/*
4******************************************************************************
5*
2ca993e8 6* Copyright (C) 2012-2016, International Business Machines
51004dcb
A
7* Corporation and others. All Rights Reserved.
8*
9******************************************************************************
10*/
11
12#ifndef __UTYPEINFO_H__
13#define __UTYPEINFO_H__
14
15// Windows header <typeinfo> does not define 'exception' in 'std' namespace.
2ca993e8 16// Therefore, a project using ICU cannot be compiled with _HAS_EXCEPTIONS
51004dcb 17// set to 0 on Windows with Visual Studio. To work around that, we have to
2ca993e8 18// include <exception> explicitly and add using statement below.
51004dcb
A
19// Whenever 'typeid' is used, this header has to be included
20// instead of <typeinfo>.
2ca993e8 21// Visual Studio 10 emits warning 4275 with this change. If you compile
51004dcb
A
22// with exception disabled, you have to suppress warning 4275.
23#if defined(_MSC_VER) && _HAS_EXCEPTIONS == 0
24#include <exception>
25using std::exception;
26#endif
f3c0d7a5 27#if defined(__GLIBCXX__)
57a6839d
A
28namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364
29#endif
51004dcb
A
30#include <typeinfo> // for 'typeid' to work
31
32#endif