Use <type_traits>, when possible.

This commit is contained in:
Andrey Semashev
2024-02-20 01:36:18 +03:00
parent 46af0a9514
commit 7bdccb0d2f
5 changed files with 339 additions and 191 deletions

View File

@@ -1,7 +1,7 @@
// filesystem path_traits.hpp --------------------------------------------------------//
// Copyright Beman Dawes 2009
// Copyright Andrey Semashev 2022
// Copyright Andrey Semashev 2022-2024
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
@@ -18,19 +18,16 @@
#include <locale>
#include <string>
#include <iterator>
#include <type_traits>
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
#include <string_view>
#endif
#include <boost/assert.hpp>
#include <boost/system/error_category.hpp>
#include <boost/iterator/is_iterator.hpp>
#include <boost/type_traits/declval.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/conjunction.hpp>
#include <boost/filesystem/detail/type_traits/conjunction.hpp>
#if defined(BOOST_FILESYSTEM_DETAIL_CXX23_STRING_VIEW_HAS_IMPLICIT_RANGE_CTOR)
#include <boost/type_traits/disjunction.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/filesystem/detail/type_traits/disjunction.hpp>
#endif
#if defined(BOOST_FILESYSTEM_DEPRECATED) && BOOST_FILESYSTEM_VERSION < 4
#include <vector>
@@ -315,13 +312,13 @@ struct path_source_traits< directory_entry >
//! The trait tests if the type is a known path Source tag
template< typename Tag >
struct is_known_path_source_tag :
public boost::true_type
public std::true_type
{
};
template< >
struct is_known_path_source_tag< unknown_type_tag > :
public boost::false_type
public std::false_type
{
};
@@ -336,7 +333,7 @@ struct is_path_source :
//! The trait indicates whether the type is a path Source that is natively supported by path::string_type as the source for construction/assignment/appending
template< typename T >
struct is_native_path_source :
public boost::integral_constant< bool, path_source_traits< T >::is_native >
public std::integral_constant< bool, path_source_traits< T >::is_native >
{
};
@@ -344,19 +341,19 @@ struct is_native_path_source :
//! The trait indicates whether the type is one of the supported path character types
template< typename T >
struct is_path_char_type :
public boost::false_type
public std::false_type
{
};
template< >
struct is_path_char_type< char > :
public boost::true_type
public std::true_type
{
};
template< >
struct is_path_char_type< wchar_t > :
public boost::true_type
public std::true_type
{
};
@@ -370,10 +367,13 @@ struct is_iterator_to_path_chars :
//! The trait indicates whether the type is an iterator over a sequence of path characters
template< typename Iterator >
struct is_path_source_iterator :
public boost::conjunction<
boost::iterators::is_iterator< Iterator >,
is_iterator_to_path_chars< Iterator >
>::type
public std::integral_constant<
bool,
detail::conjunction<
boost::iterators::is_iterator< Iterator >,
is_iterator_to_path_chars< Iterator >
>::value
>
{
};
@@ -381,19 +381,19 @@ struct is_path_source_iterator :
//! The trait indicates whether the type is a pointer to a sequence of native path characters
template< typename T >
struct is_native_char_ptr :
public boost::false_type
public std::false_type
{
};
template< >
struct is_native_char_ptr< path_native_char_type* > :
public boost::true_type
public std::true_type
{
};
template< >
struct is_native_char_ptr< const path_native_char_type* > :
public boost::true_type
public std::true_type
{
};
@@ -473,7 +473,7 @@ template< typename Source, typename Callback >
BOOST_FORCEINLINE typename Callback::result_type dispatch(Source const& source, Callback cb, const codecvt_type* cvt)
{
return path_traits::dispatch(source, cb, cvt,
typename path_traits::path_source_traits< typename boost::remove_cv< Source >::type >::tag_type());
typename path_traits::path_source_traits< typename std::remove_cv< Source >::type >::tag_type());
}
@@ -504,9 +504,9 @@ no_type check_convertible(...);
//! The type trait indicates whether the type has a conversion path to one of the path source types
template< typename T >
struct is_convertible_to_path_source :
public boost::integral_constant<
public std::integral_constant<
bool,
sizeof(is_convertible_to_path_source_impl::check_convertible(boost::declval< T const& >())) == sizeof(yes_type)
sizeof(is_convertible_to_path_source_impl::check_convertible(std::declval< T const& >())) == sizeof(yes_type)
>
{
};
@@ -530,9 +530,9 @@ no_type check_convertible(...);
template< typename T >
struct is_convertible_to_std_string_view :
public boost::integral_constant<
public std::integral_constant<
bool,
sizeof(is_convertible_to_std_string_view_impl::check_convertible(boost::declval< T const& >())) == sizeof(yes_type)
sizeof(is_convertible_to_std_string_view_impl::check_convertible(std::declval< T const& >())) == sizeof(yes_type)
>
{
};
@@ -554,9 +554,9 @@ no_type check_convertible(...);
template< typename T >
struct is_convertible_to_path_source_non_std_string_view :
public boost::integral_constant<
public std::integral_constant<
bool,
sizeof(is_convertible_to_path_source_non_std_string_view_impl::check_convertible(boost::declval< T const& >())) == sizeof(yes_type)
sizeof(is_convertible_to_path_source_non_std_string_view_impl::check_convertible(std::declval< T const& >())) == sizeof(yes_type)
>
{
};
@@ -564,10 +564,13 @@ struct is_convertible_to_path_source_non_std_string_view :
//! The type trait indicates whether the type has a conversion path to one of the path source types
template< typename T >
struct is_convertible_to_path_source :
public boost::disjunction<
is_convertible_to_std_string_view< T >,
is_convertible_to_path_source_non_std_string_view< T >
>::type
public std::integral_constant<
bool,
detail::disjunction<
is_convertible_to_std_string_view< T >,
is_convertible_to_path_source_non_std_string_view< T >
>::value
>
{
};
@@ -679,7 +682,7 @@ BOOST_FORCEINLINE typename Callback::result_type dispatch_convertible_impl(std::
template< typename Source, typename Callback >
BOOST_FORCEINLINE typename Callback::result_type dispatch_convertible(Source const& source, Callback cb, const codecvt_type* cvt = nullptr)
{
typedef typename boost::remove_cv< Source >::type source_t;
typedef typename std::remove_cv< Source >::type source_t;
return path_traits::dispatch_convertible_impl< source_t >(source, cb, cvt);
}
@@ -700,22 +703,22 @@ BOOST_FORCEINLINE typename Callback::result_type dispatch_convertible_sv_impl(st
}
template< typename Source, typename Callback >
BOOST_FORCEINLINE typename boost::disable_if_c<
is_convertible_to_std_string_view< typename boost::remove_cv< Source >::type >::value,
BOOST_FORCEINLINE typename std::enable_if<
!is_convertible_to_std_string_view< typename std::remove_cv< Source >::type >::value,
typename Callback::result_type
>::type dispatch_convertible(Source const& source, Callback cb, const codecvt_type* cvt = nullptr)
{
typedef typename boost::remove_cv< Source >::type source_t;
typedef typename std::remove_cv< Source >::type source_t;
return path_traits::dispatch_convertible_impl< source_t >(source, cb, cvt);
}
template< typename Source, typename Callback >
BOOST_FORCEINLINE typename boost::enable_if_c<
is_convertible_to_std_string_view< typename boost::remove_cv< Source >::type >::value,
BOOST_FORCEINLINE typename std::enable_if<
is_convertible_to_std_string_view< typename std::remove_cv< Source >::type >::value,
typename Callback::result_type
>::type dispatch_convertible(Source const& source, Callback cb, const codecvt_type* cvt = nullptr)
{
typedef typename boost::remove_cv< Source >::type source_t;
typedef typename std::remove_cv< Source >::type source_t;
return path_traits::dispatch_convertible_sv_impl< source_t >(source, cb, cvt);
}

View File

@@ -0,0 +1,49 @@
/*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* https://www.boost.org/LICENSE_1_0.txt)
*
* Copyright (c) 2024 Andrey Semashev
*/
/*!
* \file filesystem/detail/type_traits/conjunction.hpp
*
* This header contains definition of \c conjunction type trait.
*/
#ifndef BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_CONJUNCTION_HPP_INCLUDED_
#define BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_CONJUNCTION_HPP_INCLUDED_
#include <type_traits>
#include <boost/filesystem/config.hpp>
#if (defined(__cpp_lib_logical_traits) && (__cpp_lib_logical_traits >= 201510l)) || \
(defined(BOOST_MSSTL_VERSION) && (BOOST_MSSTL_VERSION >= 140) && (_MSC_FULL_VER >= 190023918) && (BOOST_CXX_VERSION >= 201703l))
namespace boost {
namespace filesystem {
namespace detail {
using std::conjunction;
} // namespace detail
} // namespace filesystem
} // namespace boost
#else
#include <boost/type_traits/conjunction.hpp>
namespace boost {
namespace filesystem {
namespace detail {
using boost::conjunction;
} // namespace detail
} // namespace filesystem
} // namespace boost
#endif
#endif // BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_CONJUNCTION_HPP_INCLUDED_

View File

@@ -0,0 +1,49 @@
/*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* https://www.boost.org/LICENSE_1_0.txt)
*
* Copyright (c) 2024 Andrey Semashev
*/
/*!
* \file filesystem/detail/type_traits/disjunction.hpp
*
* This header contains definition of \c disjunction type trait.
*/
#ifndef BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_DISJUNCTION_HPP_INCLUDED_
#define BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_DISJUNCTION_HPP_INCLUDED_
#include <type_traits>
#include <boost/filesystem/config.hpp>
#if (defined(__cpp_lib_logical_traits) && (__cpp_lib_logical_traits >= 201510l)) || \
(defined(BOOST_MSSTL_VERSION) && (BOOST_MSSTL_VERSION >= 140) && (_MSC_FULL_VER >= 190023918) && (BOOST_CXX_VERSION >= 201703l))
namespace boost {
namespace filesystem {
namespace detail {
using std::disjunction;
} // namespace detail
} // namespace filesystem
} // namespace boost
#else
#include <boost/type_traits/disjunction.hpp>
namespace boost {
namespace filesystem {
namespace detail {
using boost::disjunction;
} // namespace detail
} // namespace filesystem
} // namespace boost
#endif
#endif // BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_DISJUNCTION_HPP_INCLUDED_

View File

@@ -0,0 +1,49 @@
/*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* https://www.boost.org/LICENSE_1_0.txt)
*
* Copyright (c) 2024 Andrey Semashev
*/
/*!
* \file filesystem/detail/type_traits/negation.hpp
*
* This header contains definition of \c negation type trait.
*/
#ifndef BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_NEGATION_HPP_INCLUDED_
#define BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_NEGATION_HPP_INCLUDED_
#include <type_traits>
#include <boost/filesystem/config.hpp>
#if (defined(__cpp_lib_logical_traits) && (__cpp_lib_logical_traits >= 201510l)) || \
(defined(BOOST_MSSTL_VERSION) && (BOOST_MSSTL_VERSION >= 140) && (_MSC_FULL_VER >= 190023918) && (BOOST_CXX_VERSION >= 201703l))
namespace boost {
namespace filesystem {
namespace detail {
using std::negation;
} // namespace detail
} // namespace filesystem
} // namespace boost
#else
#include <boost/type_traits/negation.hpp>
namespace boost {
namespace filesystem {
namespace detail {
using boost::negation;
} // namespace detail
} // namespace filesystem
} // namespace boost
#endif
#endif // BOOST_FILESYSTEM_DETAIL_TYPE_TRAITS_NEGATION_HPP_INCLUDED_

View File

@@ -16,27 +16,25 @@
#ifndef BOOST_FILESYSTEM_PATH_HPP
#define BOOST_FILESYSTEM_PATH_HPP
#include <boost/assert.hpp>
#include <boost/filesystem/config.hpp>
#include <boost/filesystem/detail/path_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/io/quoted.hpp>
#include <boost/functional/hash_fwd.hpp>
#include <boost/type_traits/negation.hpp>
#include <boost/type_traits/conjunction.hpp>
#include <boost/type_traits/disjunction.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <cstddef>
#include <iosfwd>
#include <locale>
#include <string>
#include <iterator>
#include <type_traits>
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
#include <string_view>
#endif
#include <boost/assert.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/io/quoted.hpp>
#include <boost/functional/hash_fwd.hpp>
#include <boost/filesystem/detail/path_traits.hpp>
#include <boost/filesystem/detail/type_traits/negation.hpp>
#include <boost/filesystem/detail/type_traits/conjunction.hpp>
#include <boost/filesystem/detail/type_traits/disjunction.hpp>
#include <boost/filesystem/detail/header.hpp> // must be the last #include
@@ -350,10 +348,10 @@ public:
template<
typename Source,
typename = typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_native_path_source< typename boost::remove_cv< Source >::type > >
typename = typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_native_path_source< typename std::remove_cv< Source >::type > >
>::value
>::type
>
@@ -364,10 +362,10 @@ public:
template<
typename Source,
typename = typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_native_path_source< typename boost::remove_cv< Source >::type > >
typename = typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_native_path_source< typename std::remove_cv< Source >::type > >
>::value
>::type
>
@@ -425,10 +423,10 @@ public:
template<
typename InputIterator,
typename = typename boost::enable_if_c<
boost::conjunction<
typename = typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source_iterator< InputIterator >,
boost::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
detail::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
>::value
>::type
>
@@ -444,10 +442,10 @@ public:
template<
typename InputIterator,
typename = typename boost::enable_if_c<
boost::conjunction<
typename = typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source_iterator< InputIterator >,
boost::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
detail::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
>::value
>::type
>
@@ -471,10 +469,10 @@ public:
path& operator=(path const& p);
template< typename Source >
typename boost::enable_if_c<
boost::disjunction<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
typename std::enable_if<
detail::disjunction<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
path&
>::type operator=(Source const& source)
@@ -489,8 +487,8 @@ public:
}
template< typename Source >
typename boost::enable_if_c<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >::value,
typename std::enable_if<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >::value,
path&
>::type assign(Source const& source)
{
@@ -499,10 +497,10 @@ public:
}
template< typename Source >
typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type > >
typename std::enable_if<
detail::conjunction<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_path_source< typename std::remove_cv< Source >::type > >
>::value,
path&
>::type assign(Source const& source)
@@ -518,8 +516,8 @@ public:
}
template< typename Source >
typename boost::enable_if_c<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >::value,
typename std::enable_if<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >::value,
path&
>::type assign(Source const& source, codecvt_type const& cvt)
{
@@ -528,10 +526,10 @@ public:
}
template< typename Source >
typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type > >
typename std::enable_if<
detail::conjunction<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_path_source< typename std::remove_cv< Source >::type > >
>::value,
path&
>::type assign(Source const& source, codecvt_type const& cvt)
@@ -547,10 +545,10 @@ public:
}
template< typename InputIterator >
typename boost::enable_if_c<
boost::conjunction<
typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source_iterator< InputIterator >,
boost::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
detail::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
>::value,
path&
>::type assign(InputIterator begin, InputIterator end)
@@ -572,10 +570,10 @@ public:
}
template< typename InputIterator >
typename boost::enable_if_c<
boost::conjunction<
typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source_iterator< InputIterator >,
boost::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
detail::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
>::value,
path&
>::type assign(InputIterator begin, InputIterator end, codecvt_type const& cvt)
@@ -595,8 +593,8 @@ public:
path& operator+=(path const& p);
template< typename Source >
typename boost::enable_if_c<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
typename std::enable_if<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >::value,
path&
>::type operator+=(Source const& source)
{
@@ -610,7 +608,7 @@ public:
}
template< typename CharT >
typename boost::enable_if_c<
typename std::enable_if<
detail::path_traits::is_path_char_type< CharT >::value,
path&
>::type operator+=(CharT c)
@@ -629,8 +627,8 @@ public:
}
template< typename Source >
typename boost::enable_if_c<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >::value,
typename std::enable_if<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >::value,
path&
>::type concat(Source const& source)
{
@@ -639,10 +637,10 @@ public:
}
template< typename Source >
typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type > >
typename std::enable_if<
detail::conjunction<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_path_source< typename std::remove_cv< Source >::type > >
>::value,
path&
>::type concat(Source const& source)
@@ -658,8 +656,8 @@ public:
}
template< typename Source >
typename boost::enable_if_c<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >::value,
typename std::enable_if<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >::value,
path&
>::type concat(Source const& source, codecvt_type const& cvt)
{
@@ -668,10 +666,10 @@ public:
}
template< typename Source >
typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type > >
typename std::enable_if<
detail::conjunction<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_path_source< typename std::remove_cv< Source >::type > >
>::value,
path&
>::type concat(Source const& source, codecvt_type const& cvt)
@@ -687,10 +685,10 @@ public:
}
template< typename InputIterator >
typename boost::enable_if_c<
boost::conjunction<
typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source_iterator< InputIterator >,
boost::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
detail::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
>::value,
path&
>::type concat(InputIterator begin, InputIterator end)
@@ -710,10 +708,10 @@ public:
}
template< typename InputIterator >
typename boost::enable_if_c<
boost::conjunction<
typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source_iterator< InputIterator >,
boost::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
detail::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
>::value,
path&
>::type concat(InputIterator begin, InputIterator end, codecvt_type const& cvt)
@@ -734,8 +732,8 @@ public:
path& operator/=(path const& p);
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
BOOST_FORCEINLINE typename std::enable_if<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >::value,
path&
>::type operator/=(Source const& source)
{
@@ -745,8 +743,8 @@ public:
path& append(path const& p);
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >::value,
BOOST_FORCEINLINE typename std::enable_if<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >::value,
path&
>::type append(Source const& source)
{
@@ -755,10 +753,10 @@ public:
}
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type > >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_path_source< typename std::remove_cv< Source >::type > >
>::value,
path&
>::type append(Source const& source)
@@ -770,8 +768,8 @@ public:
path& append(path const& p, codecvt_type const&);
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >::value,
BOOST_FORCEINLINE typename std::enable_if<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >::value,
path&
>::type append(Source const& source, codecvt_type const& cvt)
{
@@ -780,10 +778,10 @@ public:
}
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type > >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_path_source< typename std::remove_cv< Source >::type > >
>::value,
path&
>::type append(Source const& source, codecvt_type const& cvt)
@@ -795,10 +793,10 @@ public:
path& append(const value_type* begin, const value_type* end);
template< typename InputIterator >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source_iterator< InputIterator >,
boost::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
detail::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
>::value,
path&
>::type append(InputIterator begin, InputIterator end)
@@ -811,10 +809,10 @@ public:
path& append(const value_type* begin, const value_type* end, codecvt_type const&);
template< typename InputIterator >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
detail::path_traits::is_path_source_iterator< InputIterator >,
boost::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
detail::negation< detail::path_traits::is_native_char_ptr< InputIterator > >
>::value,
path&
>::type append(InputIterator begin, InputIterator end, const codecvt_type& cvt)
@@ -930,8 +928,8 @@ public:
int compare(path const& p) const; // generic, lexicographical
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >::value,
BOOST_FORCEINLINE typename std::enable_if<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >::value,
int
>::type compare(Source const& source) const
{
@@ -939,10 +937,10 @@ public:
}
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type > >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_path_source< typename std::remove_cv< Source >::type > >
>::value,
int
>::type compare(Source const& source) const
@@ -951,8 +949,8 @@ public:
}
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type >::value,
BOOST_FORCEINLINE typename std::enable_if<
detail::path_traits::is_path_source< typename std::remove_cv< Source >::type >::value,
int
>::type compare(Source const& source, codecvt_type const& cvt) const
{
@@ -960,10 +958,10 @@ public:
}
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >,
boost::negation< detail::path_traits::is_path_source< typename boost::remove_cv< Source >::type > >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >,
detail::negation< detail::path_traits::is_path_source< typename std::remove_cv< Source >::type > >
>::value,
int
>::type compare(Source const& source, codecvt_type const& cvt) const
@@ -1169,10 +1167,10 @@ BOOST_FORCEINLINE bool operator==(path const& lhs, path const& rhs)
}
template< typename Path, typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator==(Path const& lhs, Source const& rhs)
@@ -1181,10 +1179,10 @@ BOOST_FORCEINLINE typename boost::enable_if_c<
}
template< typename Source, typename Path >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator==(Source const& lhs, Path const& rhs)
@@ -1198,10 +1196,10 @@ BOOST_FORCEINLINE bool operator!=(path const& lhs, path const& rhs)
}
template< typename Path, typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator!=(Path const& lhs, Source const& rhs)
@@ -1210,10 +1208,10 @@ BOOST_FORCEINLINE typename boost::enable_if_c<
}
template< typename Source, typename Path >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator!=(Source const& lhs, Path const& rhs)
@@ -1227,10 +1225,10 @@ BOOST_FORCEINLINE bool operator<(path const& lhs, path const& rhs)
}
template< typename Path, typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator<(Path const& lhs, Source const& rhs)
@@ -1239,10 +1237,10 @@ BOOST_FORCEINLINE typename boost::enable_if_c<
}
template< typename Source, typename Path >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator<(Source const& lhs, Path const& rhs)
@@ -1256,10 +1254,10 @@ BOOST_FORCEINLINE bool operator<=(path const& lhs, path const& rhs)
}
template< typename Path, typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator<=(Path const& lhs, Source const& rhs)
@@ -1268,10 +1266,10 @@ BOOST_FORCEINLINE typename boost::enable_if_c<
}
template< typename Source, typename Path >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator<=(Source const& lhs, Path const& rhs)
@@ -1285,10 +1283,10 @@ BOOST_FORCEINLINE bool operator>(path const& lhs, path const& rhs)
}
template< typename Path, typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator>(Path const& lhs, Source const& rhs)
@@ -1297,10 +1295,10 @@ BOOST_FORCEINLINE typename boost::enable_if_c<
}
template< typename Source, typename Path >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator>(Source const& lhs, Path const& rhs)
@@ -1314,10 +1312,10 @@ BOOST_FORCEINLINE bool operator>=(path const& lhs, path const& rhs)
}
template< typename Path, typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator>=(Path const& lhs, Source const& rhs)
@@ -1326,10 +1324,10 @@ BOOST_FORCEINLINE typename boost::enable_if_c<
}
template< typename Source, typename Path >
BOOST_FORCEINLINE typename boost::enable_if_c<
boost::conjunction<
boost::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
BOOST_FORCEINLINE typename std::enable_if<
detail::conjunction<
std::is_same< Path, path >,
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >
>::value,
bool
>::type operator>=(Source const& lhs, Path const& rhs)
@@ -1340,8 +1338,8 @@ BOOST_FORCEINLINE typename boost::enable_if_c<
// Note: Declared as a template to delay binding to Boost.ContainerHash functions and make the dependency optional
template< typename Path >
inline typename boost::enable_if_c<
boost::is_same< Path, path >::value,
inline typename std::enable_if<
std::is_same< Path, path >::value,
std::size_t
>::type hash_value(Path const& p) noexcept
{
@@ -1367,8 +1365,8 @@ BOOST_FORCEINLINE path operator/(path lhs, path const& rhs)
}
template< typename Source >
BOOST_FORCEINLINE typename boost::enable_if_c<
detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
BOOST_FORCEINLINE typename std::enable_if<
detail::path_traits::is_convertible_to_path_source< typename std::remove_cv< Source >::type >::value,
path
>::type operator/(path lhs, Source const& rhs)
{