Skip to content

Commit

Permalink
Remove intrinsics on MSVC, because they don't work in SFINAE contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Jun 26, 2016
1 parent 8d9b0e8 commit 0c1e81d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions include/fit/detail/intrinsics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@
#else
#define FIT_IS_FINAL(...) __is_final(__VA_ARGS__)
#endif
#elif defined(_MSC_VER)
#define FIT_IS_CONSTRUCTIBLE(...) __is_constructible(__VA_ARGS__)
#define FIT_IS_CONVERTIBLE(...) __is_convertible_to(__VA_ARGS__)
#define FIT_IS_BASE_OF(...) __is_base_of(__VA_ARGS__)
#define FIT_IS_CLASS(...) __is_class(__VA_ARGS__)
#define FIT_IS_EMPTY(...) __is_empty(__VA_ARGS__)
#define FIT_IS_LITERAL(...) std::is_literal_type<__VA_ARGS__>::value
#define FIT_IS_POLYMORPHIC(...) __is_polymorphic(__VA_ARGS__)
#define FIT_IS_FINAL(...) __is_final(__VA_ARGS__)
#else
#define FIT_IS_CONSTRUCTIBLE(...) std::is_constructible<__VA_ARGS__>::value
#define FIT_IS_CONVERTIBLE(...) std::is_convertible<__VA_ARGS__>::value
Expand All @@ -53,8 +44,12 @@
#define FIT_IS_EMPTY(...) std::is_empty<__VA_ARGS__>::value
#define FIT_IS_LITERAL(...) std::is_literal_type<__VA_ARGS__>::value
#define FIT_IS_POLYMORPHIC(...) std::is_polymorphic<__VA_ARGS__>::value
#if defined(_MSC_VER)
#define FIT_IS_FINAL(...) __is_final(__VA_ARGS__)
#else
#define FIT_IS_FINAL(...) (false)
#endif
#endif

#if FIT_NO_STD_DEFAULT_CONSTRUCTIBLE
#define FIT_IS_DEFAULT_CONSTRUCTIBLE(...) fit::detail::is_default_constructible_helper<__VA_ARGS__>::value
Expand Down

0 comments on commit 0c1e81d

Please sign in to comment.