Test for ROOT-8443
Test clean-up of forward decl with or without template default parameter and user forward decl also with or without template default parameter and located before or after the inclusion of the annotated/dictionary forward decls.
This commit is contained in:
parent
6920d6d460
commit
1bd0822562
@ -26,10 +26,27 @@ A<int> ai2;
|
||||
// compilation error at this next line:
|
||||
A<float> af2;
|
||||
|
||||
|
||||
// We want to make sure that forward template carying default are not
|
||||
// affected and that forward declaration are properly cleaned-up (if needed).
|
||||
template <typename T = int> class DefaultInFwd;
|
||||
template <typename T> class WithDefaultAndFwd;
|
||||
|
||||
.T Def2.h fwd_Def2.h
|
||||
#include "fwd_Def2.h"
|
||||
|
||||
// In some implementation the AutoloadingVisitor, when called upon by the next
|
||||
// #includes, was not properly removing default value that was attached to
|
||||
// this following class template forward declaration (the default comes from
|
||||
// the forward declaration in fwd_Def2.h). See ROOT-8443.
|
||||
template <typename T> class TemplateWithUserForward;
|
||||
|
||||
#include "Def2.h"
|
||||
|
||||
DefaultInFwd<> dif;
|
||||
WithDefaultAndFwd<> wdaf;
|
||||
TemplateWithUserForward<> twuf;
|
||||
|
||||
.T Enum.h fwd_enums.h
|
||||
#include "fwd_enums.h"
|
||||
#include "Enum.h"
|
||||
|
@ -12,6 +12,9 @@ class Foo {};
|
||||
template <typename T>
|
||||
class Foo;
|
||||
|
||||
template <typename T> class DefaultInFwd {};
|
||||
template <typename T = int> class WithDefaultAndFwd {};
|
||||
template <typename T = int> class TemplateWithUserForward{};
|
||||
|
||||
|
||||
namespace M {
|
||||
|
Loading…
Reference in New Issue
Block a user