mirror of https://github.com/davisking/dlib.git
Made dlib::file implicitly convertible to std::string.
This commit is contained in:
parent
454c2ea121
commit
520b7c30db
|
@ -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
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue