<commit_before>#include "../Tests.h"
#include "../NamespacesBase/NamespacesBase.h"
#include "Independent.h"
#include <string>
#include <vector>

// Namespace clashes with NamespacesBase.OverlappingNamespace
// Test whether qualified names turn out right.
namespace OverlappingNamespace
{
    class DLL_API InDerivedLib
    {
    public:
        InDerivedLib();
        Base parentNSComponent;
        ColorsEnum color;
    };
}


// Using a type imported from a different library.
class DLL_API Derived : public Base2
{
public:
    Derived();

    Base baseComponent;
    Base getBase();
    void setBase(Base);

    void parent(int i);

    OverlappingNamespace::InBaseLib nestedNSComponent;
    OverlappingNamespace::InBaseLib getNestedNSComponent();
    void setNestedNSComponent(OverlappingNamespace::InBaseLib);

    OverlappingNamespace::ColorsEnum color;

private:
    int d;
};

// For reference: using a type derived in the same library
class Base3
{
};

template <typename T> class TemplateClass;

class DLL_API Derived2 : public Base3
{
public:
    Base3 baseComponent;
    Base3 getBase();
    void setBase(Base3);

    OverlappingNamespace::InDerivedLib nestedNSComponent;
    OverlappingNamespace::InDerivedLib getNestedNSComponent();
    void setNestedNSComponent(OverlappingNamespace::InDerivedLib);
    void defaultEnumValueFromDependency(OverlappingNamespace::ColorsEnum c = OverlappingNamespace::ColorsEnum::black);

    TemplateClass<int> getTemplate();
    typedef TemplateWithIndependentFields<int> LocalTypedefSpecialization;
    LocalTypedefSpecialization getLocalTypedefSpecialization();
    Abstract* getAbstract();
private:
    TemplateClass<int> t;
    TemplateClass<Derived> d;
};

class DLL_API HasVirtualInDependency : public HasVirtualInCore
{
public:
    HasVirtualInDependency* managedObject;
    int callManagedOverride();
};

class DLL_API DerivedFromExternalSpecialization : public TemplateWithIndependentFields<Derived>
{
public:
    DerivedFromExternalSpecialization(int i,
                                      TemplateWithIndependentFields<HasVirtualInDependency> defaultExternalSpecialization =
                                          TemplateWithIndependentFields<HasVirtualInDependency>());
    TemplateWithIndependentFields<Base3> returnExternalSpecialization();
};

class DLL_API DerivedFromSecondaryBaseInDependency : public Derived, public SecondaryBase
{
};

template<typename T>
class CustomAllocator
{
public:
    typedef T value_type;

    T* allocate(size_t cnt, const void* = 0)
    {
        return 0;
    }
    void deallocate(T* p, size_t cnt)
    {
    }
};

class DLL_API Ignored
{
private:
    std::basic_string<char, std::char_traits<char>, CustomAllocator<char>> customAllocatedString;
};

template<class T, class Alloc = CustomAllocator<T>>
using vector = ::std::vector<T, Alloc>;

class DLL_API StdFields
{
private:
   vector<unsigned int, CustomAllocator<unsigned int>> customAllocatedVector;<commit_msg>Fix a test for the new msvc in vs 2022<commit_after>#include "../Tests.h"
#include "../NamespacesBase/NamespacesBase.h"
#include "Independent.h"
#include <string>
#include <vector>

// Namespace clashes with NamespacesBase.OverlappingNamespace
// Test whether qualified names turn out right.
namespace OverlappingNamespace
{
    class DLL_API InDerivedLib
    {
    public:
        InDerivedLib();
        Base parentNSComponent;
        ColorsEnum color;
    };
}


// Using a type imported from a different library.
class DLL_API Derived : public Base2
{
public:
    Derived();

    Base baseComponent;
    Base getBase();
    void setBase(Base);

    void parent(int i);

    OverlappingNamespace::InBaseLib nestedNSComponent;
    OverlappingNamespace::InBaseLib getNestedNSComponent();
    void setNestedNSComponent(OverlappingNamespace::InBaseLib);

    OverlappingNamespace::ColorsEnum color;

private:
    int d;
};

// For reference: using a type derived in the same library
class Base3
{
};

template <typename T> class TemplateClass;

class DLL_API Derived2 : public Base3
{
public:
    Base3 baseComponent;
    Base3 getBase();
    void setBase(Base3);

    OverlappingNamespace::InDerivedLib nestedNSComponent;
    OverlappingNamespace::InDerivedLib getNestedNSComponent();
    void setNestedNSComponent(OverlappingNamespace::InDerivedLib);
    void defaultEnumValueFromDependency(OverlappingNamespace::ColorsEnum c = OverlappingNamespace::ColorsEnum::black);

    TemplateClass<int> getTemplate();
    typedef TemplateWithIndependentFields<int> LocalTypedefSpecialization;
    LocalTypedefSpecialization getLocalTypedefSpecialization();
    Abstract* getAbstract();
private:
    TemplateClass<int> t;
    TemplateClass<Derived> d;
};

class DLL_API HasVirtualInDependency : public HasVirtualInCore
{
public:
    HasVirtualInDependency* managedObject;
    int callManagedOverride();
};

class DLL_API DerivedFromExternalSpecialization : public TemplateWithIndependentFields<Derived>
{
public:
    DerivedFromExternalSpecialization(int i,
                                      TemplateWithIndependentFields<HasVirtualInDependency> defaultExternalSpecialization =
                                          TemplateWithIndependentFields<HasVirtualInDependency>());
    TemplateWithIndependentFields<Base3> returnExternalSpecialization();
};

class DLL_API DerivedFromSecondaryBaseInDependency : public Derived, public SecondaryBase
{
};

template<typename T>
class CustomAllocator
{
public:
    typedef T value_type;

    T* allocate(size_t cnt, const void* = 0) { return 0; }
    void deallocate(T* p, size_t cnt) {}
    bool operator==(const CustomAllocator&) { return true; }
};

class DLL_API Ignored
{
private:
    std::basic_string<char, std::char_traits<char>, CustomAllocator<char>> customAllocatedString;
};

template<class T, class Alloc = CustomAllocator<T>>
using vector = ::std::vector<T, Alloc>;

class DLL_API StdFields
{
private:
   vector<unsigned int, CustomAllocator<unsigned int>> customAllocatedVector;
{'fraction_non_alphanumeric': 0.08462435448942196, 'fraction_numerical': 0.00399800099950025, 'mean_word_length': 4.498168498168498, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3303185', 'n_tokens_mistral': 1724, 'n_tokens_neox': 1651, 'n_words': 407}