1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef BOOST_NOWIDE_DETAIL_IS_PATH_HPP_INCLUDED
- #define BOOST_NOWIDE_DETAIL_IS_PATH_HPP_INCLUDED
- #include <type_traits>
- namespace boost {
- namespace nowide {
- namespace detail {
-
-
- template<typename T>
- struct is_path
- {
- template<typename U, U& (U::*)(), U (U::*)() const>
- struct Check;
- template<typename U>
- static std::true_type test(Check<U, &U::make_preferred, &U::filename>*);
- template<typename U>
- static std::false_type test(...);
- static constexpr bool value = decltype(test<T>(0))::value;
- };
-
- template<typename Path, typename Result>
- using enable_if_path_t = typename std::enable_if<is_path<Path>::value, Result>::type;
- }
- }
- }
- #endif
|