Fix: using statement in another namespace that pointer to type alias#1329
Fix: using statement in another namespace that pointer to type alias#1329HungMingWu wants to merge 1 commit intohsutter:mainfrom
Conversation
|
Thanks for your pull request! This is your first PR since the project has permanently switched to a standard commercial OSS license, and I've emailed you the new Contributor License Agreement (CLA), which will cover this and all your future contributions. Once it's completed I can look at your PR. For more details see #1322 . |
|
Thanks! I am not able to make progress evaluating this because it seems to need testing...
I'm currently getting failures at 1(c). I've just committed the results of 1(b) for reference. |
|
Seems the main branch have modified on my previous code base commit, I will fix it later. |
|
I find the root cause namespace A {
template<bool> struct t { };
constexpr bool f(const t<true>&) { return true; }
constexpr t<true> o{};
} // namespace ns
A : namespace = {
t1: <_: t<o.f()>> type == bool;
}
B : namespace = {
using A::t1;
}
int main()
{
return 0;
}From main branch, it would become #line 9 "test.cpp2"
namespace A {
}
namespace B {
using A::t1;
}
//=== Cpp2 type definitions and function declarations ===========================
#line 1 "test.cpp2"
namespace A {
template<bool> struct t { };
constexpr bool f(const t<true>&) { return true; }
constexpr t<true> o{};
} // namespace ns
#line 9 "test.cpp2"
namespace A {
template<t<CPP2_UFCS_NONLOCAL(f)(o)> UnnamedTypeParam1_1> using t1 = bool;
}
namespace B {
using A::t1;
}
//=== Cpp2 type definitions and function declarations ===========================
#line 1 "test.cpp2"
namespace A {
template<bool> struct t { };
constexpr bool f(const t<true>&) { return true; }
constexpr t<true> o{};
} // namespace nsLooks it needs to move cpp1 namespace definition before stage0. |
Reopen PR #1286