slycelote / caide-cpp-inliner

Transform a C++ program consisting of multiple source files and headers into a single self-contained source file without any external dependencies (except for standard system headers). Unused code is not included in the resulting file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template friend declaration gets removed

Predelnik opened this issue · comments

Example:

template <typename T>
class C;
template <typename T>
class D
{
  static void f ();
  template <typename>
  friend class C;
};
template <typename T>
class C
{
public:
  static void f ()
  {
    D<T>::f ();
  }
};
int main ()
{
  C<int>::f ();
}

Everything else is preserved but

template <typename>
friend class C;

gets removed which makes D<T> inaccessible from C<T>