Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WTF does WTF represent in the WebKit code base?

I downloaded Chromium's code base and ran across the WTF namespace.

namespace WTF {     /*      * C++'s idea of a reinterpret_cast lacks sufficient cojones.      */     template<typename TO, typename FROM>     TO bitwise_cast(FROM in)     {         COMPILE_ASSERT(sizeof(TO) == sizeof(FROM), WTF_wtf_reinterpret_cast_sizeof_types_is_equal);         union {             FROM from;             TO to;         } u;         u.from = in;         return u.to;     } } // namespace WTF 

Does this mean what I think it means? Could be so, the bitwise_cast implementation specified here will not compile if either TO or FROM is not a POD and is not (AFAIK) more powerful than C++ built in reinterpret_cast.

The only point of light I see here is the nobody seems to be using bitwise_cast in the Chromium project.

like image 733
Motti Avatar asked May 07 '09 11:05

Motti


1 Answers

It’s short for Web Template Framework and provides commonly used functions all over the WebKit codebase.

like image 200
ismail Avatar answered Oct 04 '22 22:10

ismail