| 112 | }; |
| 113 | |
| 114 | class convertible_to_path |
| 115 | { |
| 116 | private: |
| 117 | fs::path m_path; |
| 118 | |
| 119 | public: |
| 120 | convertible_to_path() {} |
| 121 | convertible_to_path(convertible_to_path const& that) : m_path(that.m_path) {} |
| 122 | template< typename T > |
| 123 | convertible_to_path(T const& that) : m_path(that) {} |
| 124 | |
| 125 | convertible_to_path& operator= (convertible_to_path const& that) |
| 126 | { |
| 127 | m_path = that.m_path; |
| 128 | return *this; |
| 129 | } |
| 130 | template< typename T > |
| 131 | convertible_to_path& operator= (T const& that) |
| 132 | { |
| 133 | m_path = that; |
| 134 | return *this; |
| 135 | } |
| 136 | |
| 137 | operator fs::path() const { return m_path; } |
| 138 | }; |
| 139 | |
| 140 | //! Test type to verify that the conversion to path is preferred (https://github.com/boostorg/filesystem/issues/326) |
| 141 | class convertible_to_path_and_strings |
no outgoing calls