Greetings Kind Regards
The routines below do not compile w/ error messages shown. I am mostly interested in the first routine
assert_Search_results
The error refers to a template parameter being shadowed. I do not know what that means. I seek your kind assistance. Thank You Kindly
Solution found. See below.
import std.core;
using namespace std;
#define LINE_FUNCSIG cout << __LINE__ << ' ' << __FUNCSIG__ << endl;
namespace TREE
{
template<typename treeType, template<typename> typename keyReferenceWrapper, template<typename> typename valueReferenceWrapper>
struct key_x_value {};
}
template<typename T>
struct non_reference_wrapper {};
struct cContiguousIntervalTree
{
using this_tree_type = cContiguousIntervalTree;
template<typename T>
using key_reference_wrapper = non_reference_wrapper<T>;
template<template<typename> typename valueReferenceWrapper>
using key_x_value_template = TREE::key_x_value<this_tree_type, key_reference_wrapper, valueReferenceWrapper>;
template<template<typename> typename referenceWrapper>
using intersecting_x_datum_template = key_x_value_template<referenceWrapper>;
};
template<typename treeType, template<typename> class referenceWrapper>
void assert_Search_result(const vector<typename treeType::intersecting_x_datum_template<referenceWrapper>>);
template<typename T, typename U>
void foo(typename T::key_reference_wrapper);
template<typename T, typename U>
void goo(typename T::U);
Solution:
template<typename treeType, template<typename> typename referenceWrapper, typename U>
void assert_Search_result(typename treeType:: template intersecting_x_datum_template<referenceWrapper<U>>);
Invoked as:
assert_Search_result<defined_tree_type_here, defined_reference_wrapper_type_here>(argument_here);
What I have tried:
Examined cppreference page link below re / dependent type. Was not helpful. Examined Microsoft page link below re / error C7576. Was not helpful. Searched web for "template shadow". Found nothing. Examined code above to determine why all these underlines. Was not helpful. Finally learned < and > need to be converted to < and >
Dependent names - cppreference.com< / a>[ ^ ]
Compiler errors C7500 through C7999 | Microsoft Learn[
^ ]