Commit 520b7c30 authored by Davis King's avatar Davis King

Made dlib::file implicitly convertible to std::string.

parent 454c2ea1
......@@ -101,6 +101,9 @@ namespace dlib
inline const std::string& full_name (
) const { return state.full_name; }
operator std::string (
) const { return full_name(); }
inline uint64 size (
) const { return state.file_size; }
......
......@@ -109,6 +109,9 @@ namespace dlib
inline uint64 size (
) const { return state.file_size; }
operator std::string (
) const { return full_name(); }
bool operator == (
const file& rhs
) const;
......
......@@ -139,6 +139,14 @@ namespace dlib
- returns the size of this file in bytes.
!*/
operator std::string (
) const;
/*!
ensures
- returns full_name()
(i.e. provides an implicit conversion to string from dlib::file)
!*/
file& operator= (
const file& rhs
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment