Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: base/files/file_path.h

Issue 2778183003: Make base::FilePath move constructor and assignment noexcept. (Closed)
Patch Set: Just move constructor Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/files/file_path.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // FilePath is a container for pathnames stored in a platform's native string 5 // FilePath is a container for pathnames stored in a platform's native string
6 // type, providing containers for manipulation in according with the 6 // type, providing containers for manipulation in according with the
7 // platform's conventions for pathnames. It supports the following path 7 // platform's conventions for pathnames. It supports the following path
8 // types: 8 // types:
9 // 9 //
10 // POSIX Windows 10 // POSIX Windows
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 static const CharType kExtensionSeparator; 177 static const CharType kExtensionSeparator;
178 178
179 FilePath(); 179 FilePath();
180 FilePath(const FilePath& that); 180 FilePath(const FilePath& that);
181 explicit FilePath(StringPieceType path); 181 explicit FilePath(StringPieceType path);
182 ~FilePath(); 182 ~FilePath();
183 FilePath& operator=(const FilePath& that); 183 FilePath& operator=(const FilePath& that);
184 184
185 // Constructs FilePath with the contents of |that|, which is left in valid but 185 // Constructs FilePath with the contents of |that|, which is left in valid but
186 // unspecified state. 186 // unspecified state.
187 FilePath(FilePath&& that); 187 FilePath(FilePath&& that) noexcept;
188 // Replaces the contents with those of |that|, which is left in valid but 188 // Replaces the contents with those of |that|, which is left in valid but
189 // unspecified state. 189 // unspecified state.
190 FilePath& operator=(FilePath&& that); 190 FilePath& operator=(FilePath&& that);
191 191
192 bool operator==(const FilePath& that) const; 192 bool operator==(const FilePath& that) const;
193 193
194 bool operator!=(const FilePath& that) const; 194 bool operator!=(const FilePath& that) const;
195 195
196 // Required for some STL containers and operations 196 // Required for some STL containers and operations
197 bool operator<(const FilePath& that) const { 197 bool operator<(const FilePath& that) const {
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 template<> 477 template<>
478 struct hash<base::FilePath> { 478 struct hash<base::FilePath> {
479 size_t operator()(const base::FilePath& f) const { 479 size_t operator()(const base::FilePath& f) const {
480 return hash<base::FilePath::StringType>()(f.value()); 480 return hash<base::FilePath::StringType>()(f.value());
481 } 481 }
482 }; 482 };
483 483
484 } // namespace BASE_HASH_NAMESPACE 484 } // namespace BASE_HASH_NAMESPACE
485 485
486 #endif // BASE_FILES_FILE_PATH_H_ 486 #endif // BASE_FILES_FILE_PATH_H_
OLDNEW
« no previous file with comments | « no previous file | base/files/file_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698