Got it.
sort(mMyClassVector.begin(), mMyClassVector.end(), [](const MyClass & a, const MyClass & b) -> bool { return a.mProperty > b.mProperty; });
I assumed it’d figure out that the > operator returned a bool (per documentation). But apparently it is not so.
Related Posts:
- How to convert a std::string to const char* or char*
- How can I convert const char* to string and then back to char*?
- outputting ascii table in C++
- What is a lambda expression in C++11?
- std::string to char*
- Conversion from string to char – c++
- What is meant with “const” at end of function declaration? [duplicate]
- What is an unsigned char?
- C++ std::priority_queue uses the lambda expression
- Usage and Syntax of std::function
- How to convert a char array to a string?
- Difference between `constexpr` and `const`
- how to implement quick sort algorithm in C++
- What is the difference between const int*, const int * const, and int const *?
- What is the difference between const int*, const int * const, and int const *?
- How to convert a single char into an int [duplicate]
- std::string to char*
- invalid new-expression of abstract class type error
- Difference between const reference and normal parameter
- invalid use of non-static member function
- What is the difference between a static and const variable?
- getline() does not work if used after some inputs
- Sorting Characters Of A C++ String
- How to create a dynamically-allocated array of const objects, but have values assigned to them?
- Convert char* to string C++
- C++: Expression must have a constant value when declaring array inside function
- What is the difference between const_iterator and non-const iterator in the C++ STL?
- Sorting Linked List C++ with pointers
- What’s the most efficient way to erase duplicates and sort a vector?
- How to alphabetically sort strings?
- Comparing the values of char arrays in C++
- Convert char array to single int?
- casting int to char using C++ style casting
- non-member function cannot have cv-qualifier
- C++ 2d char array to string
- Using cin for char array
- Where to declare/define class scope constants in C++?
- How do I simply compare characters in C++?
- Use of ‘const’ for function parameters
- Using cin to input a single letter into a char
- Is “delete this” allowed in C++?
- What is a segmentation fault?
- How many spaces for tab character(\t)?
- How to create a dynamic array of integers
- How to create a dynamic array of integers
- Linker Error C++ “undefined reference ” [duplicate]
- How do I build a graphical user interface in C++? [closed]
- C++ convert from 1 char to string?
- How do I build a graphical user interface in C++? [closed]
- convert a char* to std::string
- system(“pause”); – Why is it wrong?
- Pause Console in C++ program
- system(“pause”); – Why is it wrong?
- Pause Console in C++ program
- How to implement 2D vector array?
- Why the switch statement cannot be applied on strings?
- What is the difference between g++ and gcc?
- How to use setprecision in C++
- How to dynamically allocate arrays in C++
- What does (~0L) mean?
- How to dynamically allocate arrays in C++
- What is the best way to use a HashMap in C++?
- What is the best way to use a HashMap in C++?
- What are the differences between a pointer variable and a reference variable in C++?
- What is an undefined reference/unresolved external symbol error and how do I fix it?
- Sleep for milliseconds
- How to convert string to char array in C++?
- How can I convert a std::string to int?
- Easiest way to convert int to string in C++
- What is the difference between float and double?
- Why is “using namespace std;” considered bad practice?
- What is the easiest way to initialize a std::vector with hardcoded elements?
- Vector of Vectors to create matrix
- How to throw a C++ exception
- How to generate a random number in C++?
- pinpointing “conditional jump or move depends on uninitialized value(s)” valgrind message
- What is an undefined reference/unresolved external symbol error and how do I fix it?
- How do I find the length of an array?
- Sleep for milliseconds
- How to convert string to char array in C++?
- C++ — expected primary-expression before ‘ ‘
- Using getline() with file input in C++
- What is the effect of extern “C” in C++?
- C++ Cout & Cin & System “Ambiguous” [closed]
- ld: symbol(s) not found for architecture x86_64 error
- C++ string to double conversion
- Why are #ifndef and #define used in C++ header files?
- g++ ld: symbol(s) not found for architecture x86_64
- What exactly is the difference between “pass by reference” in C and in C++?
- How to throw a C++ exception
- How to find out if an item is present in a std::vector?
- What is meant by Resource Acquisition is Initialization (RAII)?
- When to use extern “C” in simple words? [duplicate]
- What is `CString`?
- Floating point exception( core dump
- Initializing an array of objects
- Passing Arrays to Function in C++
- What does the explicit keyword mean?
- How do I print out the contents of a vector?
- Difference between != and =! with an example(in C++)