Sunday Nov 05, 2006

One more language extension

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 Oct 31, 2006

typeof and alignof

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 Oct 05, 2006

To google public source code

New Google project - Search public source code. And if you use Firefox you can install search plugin.

Monday Jun 26, 2006

Moving

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).

Monday Jun 19, 2006

External interface for bug submitting

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++.

About

atanasyan

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today