Extent autoforwarding test with more include nesting case

This commit is contained in:
Philippe Canal 2016-11-17 15:37:30 -06:00 committed by sftnight
parent 8a096ebfb4
commit 39ea2ba5c2
4 changed files with 29 additions and 1 deletions

View File

@ -41,12 +41,22 @@ template <typename T> class WithDefaultAndFwd;
// the forward declaration in fwd_Def2.h). See ROOT-8443.
template <typename T> class TemplateWithUserForward;
// The includsion of nesting/h2.h is not (yet) supported as it is included
// in the forward declaration generation step via a #include with a path
// relative to its includer (h1.h) and this we can not properly record
// that this is the same thing as this one (or at least it is harder than
// what we do for now).
// #include "nesting/h2.h"
#include "nesting/h1.h"
#include "Def2sub.h"
#include "Def2.h"
DefaultInFwd<> dif;
WithDefaultAndFwd<> wdaf;
TemplateWithUserForward<> twuf;
TemplateWithAllDefault<> twad;
WithDefaultInH1<> wdh1;
WithDefaultInH2<> wdh2;
// In some implementation the AutoloadingVisitor was not when Def2sub.h, which
// contains the definition for CtorWithDefault, and then the implementation

View File

@ -1,6 +1,8 @@
#ifndef Def2sub_h
#define Def2sub_h
#include "nesting/h1.h"
class CtorWithDefault {
public:
CtorWithDefault(int i = 0) {};
@ -10,7 +12,7 @@ public:
// extension of the information stored with the annotation
// so that the cleanup is triggered upon any inclusion of
// of Def2sub.h rather than only the one coming from Def2.h
template <typename T> // = int>
template <typename T = int>
class TemplateWithAllDefault
{
};

View File

@ -0,0 +1,9 @@
#ifndef HEADER_H1_H
#define HEADER_H1_H
#include "h2.h"
template <typename T = int>
struct WithDefaultInH1 {};
#endif

View File

@ -0,0 +1,7 @@
#ifndef HEADER_H2_H
#define HEADER_H2_H
template <typename T = int>
struct WithDefaultInH2 {};
#endif