
Thanks to the commenter jd who provided the solution.
gcc now generates the following error:template <typename T>
class Producer
{
public:
/// ...
};
template <typename T>
class Consumer
{
public:
typedef Producer<T> Producer;
};
void ThisWontCompile()
{
Producer<int> producer;
Consumer<int> consumer;
}
test.cpp:13: error: declaration of 'typedef class ProducerWe use this pattern quite a lot in our code, and it seems reasonably tasteful. Certainly, it seems morally equivalent to the following pattern:Consumer ::Producer'
test.cpp:4: error: changes meaning of 'Producer' from 'class Producer'
...in the sense that they both change the meaning of a name within the scope of the second class.class Foo
{
public:
/// ...
};
class Bar
{
public:
void Foo() {}
};
void ThisCompiles()
{
Bar bar;
}
This shows that the gcc change was not as drastic as I first feared, and the fix is still very valid (and very readable) C++ code.template <typename T>
class Producer
{
public:
/// ...
};
template <typename T>
class Consumer
{
public:
typedef ::Producer<T> Producer;
};
void ThisDoesCompile_Hurrah()
{
Producer<int> producer;
Consumer<int> consumer;
}
DetailsThe prologue
Title: Extended STL Volume 1
Author: Matthew Wilson
Publisher: Addison-Wesley 2007
Pages: 572
ISBN: 978-0-321-30550-3
Links amazon | publisher
Summary
ProsCons
- Fairly unique coverage of this aspect of C++ coding
- Clear writing style
- The voice of an expert
Recommended if you are writing STL-like C++ code, or want to interface legacy code with STL-style C++. Make sure you have plenty of time to sit down and digest the material, though.
- Dense information, often hard to digest
- Not ideal as a reference work
Tarballs are a completely outdated concept.And he refused to package glibc releases any more. Go get it from CVS yourself. Crumbs!
RELEASE_TAG=glibc-2_8
VERSION=2.8
cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc login
cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc export -r $RELEASE_TAG libc
cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc export -r $RELEASE_TAG ports
mv ports/ glibc-ports-$VERSION
mv libc/ glibc-$VERSION
tar cfj glibc-ports-$VERSION.tar.bz2 glibc-ports-$VERSION
tar cfj glibc-$VERSION.tar.bz2 glibc-$VERSION
DetailsThis book is way old now. It covers Xcode version 2.2, which is so far behind the cutting edge it's practically blunt. It's two years old, which is about 100 years in the tech book world. So why am I bothering to post a review of such a book? Simply, because I found it useful, and it's worth doing it justice here.
Book: Beginning Xcode
Author: James Bucanek
Publisher: Wrox 2006
ISBN: 978-0-471-75479-4
Pages: 590
Links: Amazon | Publisher
Summary
Pros:Cons:
- Comprehensive and detailed
- Clear writing
A good, thorough, if old, book on Xcode developement. Suitable for complete novices to Apple development.
- Old; it covers a rather old version of Xcode
Recommended if you don't pay too much for it.