aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/type_index.h
diff options
context:
space:
mode:
authorGravatar Changming Sun <chasun@microsoft.com>2017-03-14 15:03:25 -0500
committerGravatar Jonathan Hseu <vomjom@vomjom.net>2017-03-14 13:03:25 -0700
commitae4543767708d85815321d84ff7ffd5eb896e0e4 (patch)
tree953efde77dacdd4f8d51c466fdaff44aec07414b /tensorflow/core/framework/type_index.h
parent05d7f793ec5f04cd6b362abfef620a78fefdb35f (diff)
Enable type_index on Windows (#8377)
Diffstat (limited to 'tensorflow/core/framework/type_index.h')
-rw-r--r--tensorflow/core/framework/type_index.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/framework/type_index.h b/tensorflow/core/framework/type_index.h
index dfde25c21e..b978d90fa8 100644
--- a/tensorflow/core/framework/type_index.h
+++ b/tensorflow/core/framework/type_index.h
@@ -17,7 +17,7 @@ limitations under the License.
#define TENSORFLOW_FRAMEWORK_TYPE_INDEX_H_
#include <string>
-#ifdef __GXX_RTTI
+#if defined(__GXX_RTTI) || defined(_CPPRTTI)
#include <typeindex>
#include <typeinfo>
#endif // __GXX_RTTI
@@ -30,7 +30,7 @@ namespace tensorflow {
// binary sizes. The following #ifdef section provides a non-RTTI
// replacement for std::type_index (with a minimal set of functions needed by
// the TensorFlow framework, and more can be added if necessary).
-#ifndef __GXX_RTTI
+#if !defined(__GXX_RTTI) && !defined(_CPPRTTI)
// A thin TypeIndex class that mimics std::type_index but does not use RTTI. As
// a result, it does not provide the actual name of the type, and only returns a