Home | History | Annotate | Download | only in base

Lines Matching full:static_cast

31 // Use implicit_cast as a safe version of static_cast or const_cast
41 // implicit_cast is the same as for static_cast etc.:
56 // type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
61 // if it's not). In normal mode, we do the efficient static_cast<>
76 return static_cast<To>(f);
89 // A version of static_cast that DCHECKs that the value can be precisely represented
95 (static_cast<intmax_t>(std::numeric_limits<Dest>::min()) <=
96 static_cast<intmax_t>(std::numeric_limits<Source>::min()) ||
97 source >= static_cast<Source>(std::numeric_limits<Dest>::min())) &&
99 (static_cast<uintmax_t>(std::numeric_limits<Dest>::max()) >=
100 static_cast<uintmax_t>(std::numeric_limits<Source>::max()) ||
101 source <= static_cast<Source>(std::numeric_limits<Dest>::max())));
103 return static_cast<Dest>(source);
116 DCHECK_EQ(static_cast<Source>(static_cast<uintptr_t>(source)), source);
117 return reinterpret_cast<Dest>(static_cast<uintptr_t>(source));
126 return static_cast<Dest>(reinterpret_cast<uintptr_t>(ptr));