Monday November 06, 2006 Upcoming SunStudio Express 3 will include one more c++ language extension. Recently I have implemented explicit template definition aka forward declaration of explicit instantiations. Now this extension is available under -Qoption ccfe -features=gcc command line option.
In the code below compiler will not instantiate (explicitly and implicitly) any members of class S<int>. So it will not waste a time on code generation and optimization. The only source code file should contain explicit template instantiation to successfully link the program.
% cat test.h
template <typename T>
struct S
{
void foo();
};
template <typename T>
void S<T>::foo()
{
// a lot of code here
}
extern template struct S<int>;
% cat inst.cc #include "test.h" template struct S<int>;
% cat main.cc
#include "test.h"
int main()
{
S<int> s;
s.foo();
}
Tuesday October 31, 2006 Now Sun Studio C++ accepts g++ extension - operator __typeof__ (as well as __typeof and typeof). Keyword typeof is available under -features=gcc command line option. So you can write:
int * x; __typeof__(*x) n;
Operator __alignof__ now accepts expression:
unsigned v = 0; unsigned a = __alignof__(v);
Thursday October 05, 2006
New Google project - Search public source code. And if you use Firefox you can install search plugin.
Permalink
Comments [0]
Monday June 26, 2006 I've moved from C++ sustaining to C++ development team. So I will be able to dedicate all my time to C++ compiler. Boost has still been on my focus but now I can work on some other important tasks related to Sun C++ compiler.
My colleagues from sustaining team made a present for me. It's the best professional award I have got ever before (link is on my russian blog but photos do not need translation).
Permalink
Comments [0]
Monday June 19, 2006
Take a look at Vijay post. Now even if you do not have a service contract you are able to file a bug realted to Sun C++.
Permalink
Comments [0]