I am in the process of upgrading my code for ROOT6, and was testing out the new interpreter
Why is it that I can define a lambda function or templated function in the interpreter, but I cannot define a regular function?
root [0] auto func_lambda = [](){std::cout << "lambda works" << std::endl; }
((lambda) &) @0x7fd736327028
root [1] func_lambda()
lambda works
root [2] template<typename T=void> void func_templated(){std::cout << "templated_function works" << std::endl;}
root [3] func_templated()
templated_function works
root [4] void func_regular(){std::cout << "regular function doesn't work" << std::endl;}
ROOT_prompt_4:1:20: error: function definition is not allowed here
void func_regular(){std::cout << "regular function doesn't work" << std::endl;}
^
root [5]