Error with using decltype() in C++11 (creating opaque error message in gcc 4.7.0)

后端 未结 5 2459
别那么骄傲
别那么骄傲 2021-02-19 09:55

with the following code (a boiled-down version of my original code)

#include 
#include 

template  class A;                   


        
5条回答
  •  走了就别回头了
    2021-02-19 10:35

    As I have figured out by now (see also the edits to the question) what the problem was. It turns out that all answers (sofar) didn't solve the (full) problem.

    Essentially, the evaluation of the decltype expression for the global function required eventually the private member A::a (through its occurrence in the decltype expression of A::diff()). This opens the next question about what the standard says about this.

提交回复
热议问题