// // Copyright (c) 2020 Alexander Grund // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_NOWIDE_DETAIL_IS_PATH_HPP_INCLUDED #define BOOST_NOWIDE_DETAIL_IS_PATH_HPP_INCLUDED #include namespace boost { namespace nowide { namespace detail { /// Trait to heuristically check for a *\::filesystem::path /// Done by checking for make_preferred and filename member functions with correct signature template struct is_path { template struct Check; template static std::true_type test(Check*); template static std::false_type test(...); static constexpr bool value = decltype(test(0))::value; }; /// SFINAE trait which has a member "type = Result" if the Path is a *\::filesystem::path template using enable_if_path_t = typename std::enable_if::value, Result>::type; } // namespace detail } // namespace nowide } // namespace boost #endif