怎么理解:c++不允许讲函数定义嵌套在另一函数定义中

怎么理解:c++不允许讲函数定义嵌套在另一函数定义中
能否简单说明一下,拜托!

C++ 11开始,允许嵌套定义了,C++ 现在支持Lambda表达式。

http://www.cnblogs.com/haippy/archive/2013/05/31/3111560.html

 #include <vector>
#include <iostream>
#include <algorithm>
#include <functional>

int main()
{
    std::vector<int> c { 1,2,3,4,5,6,7 };
    int x = 5;
    c.erase(std::remove_if(c.begin(), c.end(), [x](int n) { return n < x; } ), c.end());

    std::cout << "c: ";
    for (auto i: c) {
        std::cout << i << ' ';
    }
    std::cout << '\n';

    // the type of a closure cannot be named, but can be inferred with auto
    auto func1 = [](int i) { return i+4; };
    std::cout << "func1: " << func1(6) << '\n'; 

    // like all callable objects, closures can be captured in std::function
    // (this may incur unnecessary overhead)
    std::function<int(int)> func2 = 
        [](int i) {
            return i+4; 
        }; //注意,这就是一个嵌套在函数中的函数
    std::cout << "func2: " << func2(6) << '\n'; 
}

为什么之前的版本不支持,因为C++是一种发展滞后,比较简陋的语言。所以不支持。C++不支持的东西很多。