I'm trying to make the initialization of a lambda expression in class. The pseudo code could be like this
class A{
//stuff..
static constexpr auto lambda = [] (unsigned char element){//stuff..};
};
When i tried to compile i get this error message
error: ‘constexpr const A::<lambda(unsigned char)> A::get_range’, declared using local type ‘const A::<lambda(unsigned char)>’, is used but never defined [-fpermissive]
static constexpr auto lambda = [](unsigned char element){
How can i do this in class initialization? Thank you indeed and sorry for the English.