fork download
  1. #include <iostream>
  2.  
  3. class foo
  4. {
  5. private:
  6. struct bar
  7. {
  8. int member_;
  9. };
  10.  
  11. public:
  12. void print()
  13. {
  14. std::cout << sizeof(decltype(foo::bar::member_)) << std::endl;
  15. }
  16. };
  17.  
  18. int main(int argc, char* argv[])
  19. {
  20. foo f;
  21. f.print();
  22. return 0;
  23. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
4