Top "Forward-declaration" questions

Forward declarations allow statically-typed programs to indicate the type and name of a symbol without actually defining it.

How to forward declare a C++ template class?

Given a template class like the following: template<typename Type, typename IDType=typename Type::IDType> class Mappings { public: ... …

c++ templates forward-declaration
storage size of ‘names’ isn’t known

I get this error while compiling this .c source file /INIT_SOURCE_BUILD/src/names_list.c:7: error: storage size …

c struct typedef forward-declaration
Unknown type name class

I have the following header files: https://gist.github.com/wemakeweb/5501443 and the compiler always reports "Unknown Type name Class". …

c++ forward-declaration
Invalid use of incomplete type struct, even with forward declaration

I'm aware of circular dependencies, but even with forward declarations I get this area. What am I doing wrong? // facility.…

c++ forward-declaration
Forward declaration of nested types/classes in C++

I recently got stuck in a situation like this: class A { public: typedef struct/class {…} B; … C::D *someField; } class …

c++ class nested forward-declaration
Objective-C: Forward Class Declaration

I'm writing a multiview app that utilizes a class called RootViewController to switch between views. In my MyAppDelegate header, I …

objective-c c-preprocessor forward-declaration
invalid use of incomplete type / forward declaration

I tried to look at the similar problems listed here on Stackoverflow and on Google but they deal mostly with …

c++ gcc forward-declaration incomplete-type
How to forward typedef'd struct in .h

I have Preprocessor.h #define MAX_FILES 15 struct Preprocessor { FILE fileVector[MAX_FILES]; int currentFile; }; typedef struct Preprocessor Prepro; void …

c typedef forward-declaration
In C++, is it possible to forward declare a class as inheriting from another class?

I know that I can do: class Foo; but can I forward declare a class as inheriting from another, like: …

c++ inheritance forward-declaration
Forward declaration with unique_ptr?

I have found it useful to use forward declaration of classes in combination with std::unique_ptr as in the …

c++ destructor forward-declaration unique-ptr