| 82 | } |
| 83 | |
| 84 | class cmCMakePath |
| 85 | { |
| 86 | private: |
| 87 | template <typename Source> |
| 88 | using enable_if_move_pathable = |
| 89 | cm::enable_if_t<detail::is_move_pathable<Source>::value, cmCMakePath&>; |
| 90 | |
| 91 | template <typename Source> |
| 92 | using enable_if_pathable = |
| 93 | cm::enable_if_t<detail::is_pathable<Source>::value, cmCMakePath&>; |
| 94 | |
| 95 | public: |
| 96 | using value_type = cm::filesystem::path::value_type; |
| 97 | using string_type = cm::filesystem::path::string_type; |
| 98 | |
| 99 | enum format : unsigned char |
| 100 | { |
| 101 | auto_format = |
| 102 | static_cast<unsigned char>(cm::filesystem::path::format::auto_format), |
| 103 | native_format = |
| 104 | static_cast<unsigned char>(cm::filesystem::path::format::native_format), |
| 105 | generic_format = |
| 106 | static_cast<unsigned char>(cm::filesystem::path::format::generic_format) |
| 107 | }; |
| 108 | |
| 109 | class iterator; |
| 110 | using const_iterator = iterator; |
| 111 | |
| 112 | cmCMakePath() noexcept = default; |
| 113 | |
| 114 | cmCMakePath(cmCMakePath const&) = default; |
| 115 | |
| 116 | cmCMakePath(cmCMakePath&& path) noexcept |
| 117 | : Path(std::forward<cm::filesystem::path>(path.Path)) |
| 118 | { |
| 119 | } |
| 120 | |
| 121 | cmCMakePath(cm::filesystem::path path) noexcept |
| 122 | : Path(std::move(path)) |
| 123 | { |
| 124 | } |
| 125 | cmCMakePath(cm::string_view source, format fmt = generic_format) noexcept |
| 126 | : Path(FormatPath(source, fmt)) |
| 127 | { |
| 128 | } |
| 129 | cmCMakePath(char const* source, format fmt = generic_format) noexcept |
| 130 | : Path(FormatPath(cm::string_view{ source }, fmt)) |
| 131 | { |
| 132 | } |
| 133 | #if defined(__SUNPRO_CC) && defined(__sparc) |
| 134 | // Oracle DeveloperStudio C++ compiler on Solaris/Sparc is confused when |
| 135 | // standard methods and templates use the same name. The template is selected |
| 136 | // rather than the standard one regardless the arguments of the method. |
| 137 | cmCMakePath(std::string const& source, format fmt = generic_format) |
| 138 | : Path(FormatPath(source, fmt)) |
| 139 | { |
| 140 | } |
| 141 | cmCMakePath(std::string&& source, format fmt = generic_format) |
searching dependent graphs…