
2006/9/30, Douglas Gregor <doug.gregor@gmail.com>:
On Sep 29, 2006, at 4:02 PM, Simon Atanasyan wrote:
2006/9/29, Doug Gregor <dgregor@cs.indiana.edu>:
The failure is also shown here: http://tinyurl.com/zarxo I will look at compiler source code and try to fix this bug :-)
If you happen to find a way we can work around the problem in Boost, we'll do it. This isn't super-critical code in Boost, but it's the only thing in the Graph library that doesn't compile with Sun.
There are two bugs in the Sun C++ related to this problem. The first one - compiler does not recognize name of partially specialized class when the name is used without template arguments. % cat test.cc struct C { static const int value = 0; }; template <typename T1, typename T2> struct S; template <typename T> struct S<int, T> { typedef C type; static const int value = S::type::value; // This works static const int value = type::value; }; S<int, int> v; % CC -c test.cc "test.cc", line 13: Error: No parameters provided for template. "test.cc", line 16: Where: While specializing "S<int, int>". "test.cc", line 16: Where: Specialized in non-template code. "test.cc", line 13: Error: An integer constant expression is required here. "test.cc", line 16: Where: While specializing "S<int, int>". "test.cc", line 16: Where: Specialized in non-template code. 2 Error(s) detected. Workaround is obvious. Anyway I plan to fix this bug. The second error is unclear for me. It looks like compiler confused by expression as a template argument of int_ class. Unfortunately trivial test case works fine so I have to investigate further. -- Simon Atanasyan