aboutsummaryrefslogtreecommitdiff
path: root/butl/path.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'butl/path.ixx')
-rw-r--r--butl/path.ixx27
1 files changed, 27 insertions, 0 deletions
diff --git a/butl/path.ixx b/butl/path.ixx
index 0cbbeaf..3e8a9cc 100644
--- a/butl/path.ixx
+++ b/butl/path.ixx
@@ -25,6 +25,33 @@ namespace butl
}
#endif
+ // @@ Should only enable_if P is basic_path<C, K1>.
+ //
+ template <class P, class C, class K>
+ inline P
+ path_cast (const basic_path<C, K>& p)
+ {
+ return P (p.path_, false);
+ }
+
+ template <class P, class C, class K>
+ inline P
+ path_cast (basic_path<C, K>&& p)
+ {
+ return P (std::move (p.path_), false);
+ }
+
+ template <typename C, typename K>
+ inline bool basic_path<C, K>::
+ simple () const
+ {
+ return
+#ifndef _WIN32
+ root () ||
+#endif
+ traits::find_separator (this->path_) == string_type::npos;
+ }
+
template <typename C, typename K>
inline bool basic_path<C, K>::
absolute () const