Jump to page: 1 24  
Page
Thread overview
Another namespace bug
Dec 05, 2002
Christof Meerwald
Dec 05, 2002
Richard
Dec 05, 2002
Christof Meerwald
Dec 06, 2002
Christof Meerwald
Dec 06, 2002
Christof Meerwald
Dec 07, 2002
Christof Meerwald
Dec 07, 2002
Christof Meerwald
Dec 07, 2002
Christof Meerwald
Dec 08, 2002
Christof Meerwald
Dec 09, 2002
Richard
Dec 09, 2002
Richard
Dec 09, 2002
Christof Meerwald
Dec 09, 2002
Christof Meerwald
Dec 11, 2002
Christof Meerwald
Dec 11, 2002
Christof Meerwald
Dec 15, 2002
Christof Meerwald
Dec 15, 2002
Walter
Dec 15, 2002
Richard
Dec 17, 2002
Walter
Dec 17, 2002
Christof Meerwald
Dec 17, 2002
Walter
Dec 19, 2002
Richard
Dec 22, 2002
Christof Meerwald
Dec 22, 2002
Walter
Dec 22, 2002
Matthew Wilson
Dec 23, 2002
Walter
Dec 23, 2002
Robert M. Münch
Dec 23, 2002
Walter
Dec 16, 2002
Christof Meerwald
Dec 21, 2002
Christof Meerwald
Dec 21, 2002
Christof Meerwald
Jan 01, 2003
Christof Meerwald
Jan 01, 2003
Christof Meerwald
December 05, 2002
Here is another one:

namespace A
{
struct C
{
  C(int i)
  { }
};

namespace B
{
template<class T>
struct D
{
  D()
  {
    C c(3);
    // Error: undefined identifier 'C'
  }
};
}
}

int main()
{
  A::B::D<int> d;

  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

December 05, 2002
In article <asnd0i$2jn0$1@digitaldaemon.com>, Christof Meerwald says...
>
>Here is another one:

also,

typedef int Int;

namespace std { using ::Int; }

namespace one {
struct A {
std::Int* test;
};

void main() { }

gets Int is not a member of namespace std at "std::Int* test"

Richard


December 05, 2002
Another one:

namespace ns
{
struct A {};

template <class T>
struct B { };

template<>
struct B<A>
{
  typedef A iterator_category;
  // Error: ';' expected following declaration of struct member
};
}

int main()
{
  ns::B<ns::A> i;

  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

...and what have you contributed to the Net?
December 06, 2002
And another one:

namespace ns
{
template<class T>
struct A
{
  static void f()
  { }
};

template<class T>
struct B
{
  void f()
  {
    A<T>::f();
    // Error: 'ns::A<>::f' previously declared as something else
    // It was declared as: void C func()
    // It is now declared: int C func()
  }
};
}

int main()
{
  ns::B<int> b;
  b.f();

  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

...and what have you contributed to the Net?
December 06, 2002
Another one:

namespace ns
{
template<class T>
struct A
{
  void f();
};

template<class T>
void A<T>::f()
// Error: 'A' is not a class template
{ }
}


int main()
{
  ns::A<int> a;

  a.f();

  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

...and what have you contributed to the Net?
December 07, 2002
Another one:

namespace ns
{
struct A
{
  A()
  { }
};

struct B
  : public ns::A
{
  B()
    : ns::A()
  // Error: 'ns' is not a member of struct 'ns::B'
  { }
};
}


int main()
{
  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

...and what have you contributed to the Net?
December 07, 2002
template<class T>
struct A
{ };

namespace ns
{
template<class T>
struct A
// Error: 'A' is already defined
{ };
}

int main()
{
  A<int> a;
  ns::A<int> ns_a;

  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

...and what have you contributed to the Net?
December 07, 2002
template<class T>
struct A
{ };

namespace ns
{
using ::A;
}

int main()
{
  ns::A<int> a;
  // Error: '<' expected following 'A'

  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

...and what have you contributed to the Net?
December 08, 2002
namespace ns1
{
template<class T>
struct A
{
  A() { }
  // Error: namespace 'ns2' does not enclose member '?0' of namespace 'ns1'
};
}

namespace ns2
{
void f()
{
  ns1::A<int> a;
}
}


int main()
{
  ns2::f();

  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

...and what have you contributed to the Net?
December 09, 2002
namespace ns
{
template<class T>
struct A
{ };
}

using ns::A;

struct B
  : public A<int>
  // Error: 'A' is not a struct or a class
{ };


int main()
{
  B b;

  return 0;
}


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw@jabber.at mailto cmeerw at web.de

...and what have you contributed to the Net?
« First   ‹ Prev
1 2 3 4