Lines Matching refs:std
24 std::string StringLiteralUnquote(const std::string& s);
25 std::string StringLiteralQuote(const std::string& s);
29 V8_EXPORT_PRIVATE base::Optional<std::string> FileUriDecode(
30 const std::string& s);
35 std::string message;
40 DECLARE_CONTEXTUAL_VARIABLE(TorqueMessages, std::vector<TorqueMessage>);
43 std::string ToString(Args&&... args) {
44 std::stringstream stream;
45 USE((stream << std::forward<Args>(args))...);
52 MessageBuilder(const std::string& message, TorqueMessage::Kind kind);
70 std::vector<TorqueMessage> extra_messages_;
79 return MessageBuilder(ToString(std::forward<Args>(args)...), kind);
84 return Message(TorqueMessage::Kind::kError, std::forward<Args>(args)...);
88 return Message(TorqueMessage::Kind::kLint, std::forward<Args>(args)...);
91 bool IsLowerCamelCase(const std::string& s);
92 bool IsUpperCamelCase(const std::string& s);
93 bool IsSnakeCase(const std::string& s);
94 bool IsValidNamespaceConstName(const std::string& s);
95 bool IsValidTypeName(const std::string& s);
99 Error(std::forward<Args>(args)...).Throw();
102 std::string CapifyStringWithUnderscores(const std::string& camellified_string);
103 std::string CamelifyString(const std::string& underscore_string);
104 std::string SnakeifyString(const std::string& camel_string);
105 std::string DashifyString(const std::string& underscore_string);
106 std::string UnderlinifyPath(std::string path);
108 bool StartsWithSingleUnderscore(const std::string& str);
110 void ReplaceFileContentsIfDifferent(const std::string& file_path,
111 const std::string& contents);
116 const T* Add(T x) { return &*(storage_.insert(std::move(x)).first); }
119 std::unordered_set<T, base::hash<T>> storage_;
128 return std::forward<T>(x);
134 const std::string& separator;
137 friend std::ostream& operator<<(std::ostream& os, const ListPrintAdaptor& l) {
152 auto PrintList(const T& list, const std::string& separator = ", ") {
159 auto PrintList(const T& list, const std::string& separator, L&& transformer) {
161 std::forward<L>(transformer)};
165 void PrintCommaSeparatedList(std::ostream& os, const T& list, C&& transform) {
166 os << PrintList(list, ", ", std::forward<C>(transform));
170 void PrintCommaSeparatedList(std::ostream& os, const T& list) {
177 BottomOffset& operator=(std::size_t other_offset) {
204 inline std::ostream& operator<<(std::ostream& out, BottomOffset from_bottom) {
233 inline std::ostream& operator<<(std::ostream& out, StackRange range) {
242 Stack(std::initializer_list<T> initializer)
243 : Stack(std::vector<T>(initializer)) {}
244 explicit Stack(std::vector<T> v) : elements_(std::move(v)) {}
250 elements_.at(from_bottom.offset) = std::move(x);
253 elements_.push_back(std::move(x));
259 StackRange PushMany(const std::vector<T>& v) {
267 T result = std::move(elements_.back());
271 std::vector<T> PopMany(size_t count) {
273 std::vector<T> result;
276 result.push_back(std::move(*it));
288 elements_[i.offset - range.Size()] = std::move(elements_[i.offset]);
306 std::vector<T> elements_;
316 inline std::ostream& operator<<(std::ostream& os, const Stack<T>& t) {
327 // std::set or std::list. Calling this on std::vector would have quadratic
340 class NullStreambuf : public std::streambuf {
351 class NullOStream : public std::ostream {
353 NullOStream() : std::ostream(&buffer_) {}
359 inline bool StringStartsWith(const std::string& s, const std::string& prefix) {
363 inline bool StringEndsWith(const std::string& s, const std::string& suffix) {
370 IfDefScope(std::ostream& os, std::string d);
376 std::ostream& os_;
377 std::string d_;
382 NamespaceScope(std::ostream& os,
383 std::initializer_list<std::string> namespaces);
389 std::ostream& os_;
390 std::vector<std::string> d_;
395 IncludeGuardScope(std::ostream& os, std::string file_name);
401 std::ostream& os_;
402 std::string d_;
407 explicit IncludeObjectMacrosScope(std::ostream& os);
413 std::ostream& os_;
431 modulus_log_2_(std::min(modulus_log_2, kMaxModulusLog2)) {
449 std::min(a.modulus_log_2_, b.modulus_log_2_)};
461 std::min(a.modulus_log_2_ + b.AlignmentLog2(),
465 friend std::ostream& operator<<(std::ostream& os, const ResidueClass& a);
523 std::queue<T> queue_;
524 std::unordered_set<T> contained_;
528 std::vector<T> TransformVector(const std::vector<U>& v, F f) {
529 std::vector<T> result;
530 std::transform(v.begin(), v.end(), std::back_inserter(result), f);
534 std::vector<T> TransformVector(const std::vector<U>& v) {