token-name-resolution Questions

1

Solved

Could that code to be compile? #include <iostream> template <typename T> struct TMPL { using TP = typename T::TP; //is CL::TP visible (with T == CL)? }; struct CL { using TP = int;...
Saguaro asked 10/6, 2016 at 7:47

1

Solved

N4527 14.6 [temp.res]/p8 If a hypothetical instantiation of a template immediately following its definition would be ill-formed due to a construct that does not depend on a template parameter...
Cleancut asked 8/12, 2015 at 7:10

1

Solved

I think this example best illustrates my question: namespace N { class C { public: friend bool operator==(const C& c, const C& x) { return true; } friend bool f(const C& c, cons...
Adara asked 11/6, 2014 at 16:37

1

Solved

While answering this SO question (better read this "duplicate"), I came up with the following solution to dependent name resolution of an operator: [temp.dep.res]/1: In resolving dependent name...
Anticipative asked 14/5, 2013 at 16:32

1

Solved

For the following code: struct foo {}; struct A { typedef foo foo_type; void foo(); }; GCC gives a compiler error: test.cpp:7:14: error: declaration of 'void A::foo()' [-fpermissive] void ...
Drift asked 20/3, 2013 at 23:54

3

Solved

I have an odd case with Visual Studio 2003. For somewhat legitimate reasons, I have the following hierarchy: class A {}; class B : public A { public: class A {}; }; class C : public B::A {}; ...

3

Solved

Arising from my answer to Dynamic array of objects in C++ and as a follow up to What are the rules about using an underscore in a C++ identifier?: apparently, names beginning with _ followed by an ...
Twelfth asked 12/3, 2012 at 14:27

3

Solved

I test the code in the c++ standard ISO/IEC 14882-03 14.6.1/9 on Xcode 4.1 and Visual Studio 2008. The outputs of the two compiler are both different from the expected result of the standard. The ...
Cacilie asked 3/10, 2011 at 3:29

1

Where I can find a list of the rules that a C++ compliant compiler must apply in order to perform names resolution (including overloading)? I'd like something like a natural-language algorithm or ...
Palinode asked 10/9, 2011 at 20:43
1

© 2022 - 2024 — McMap. All rights reserved.