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
- What is a segmentation fault?
- When to use reinterpret_cast?
- Expression must be a modifiable lvalue
- How to read a file line by line or a whole text file at once?
- Split a string using C++11
- error: expected unqualified-id error: Meaning and fix? [duplicate]
- How to track down a “double free or corruption” error
- undefined reference to `WinMain@16′
- TranslateName() function doesn’t work on win10
- How to use the PI constant in C++
- How to concatenate two strings in C++?
- How to get current time and date in C++?
- where is the official c++ documentation
- wntdll.pdb not loaded – Can’t see the exception
- Networking with C++
- Error a function-definition is not allowed here before ‘{‘ token
- How can I create objects while adding them into a vector?
- How to debug ‘Stack smashing detected’?
- basic_string::_M_construct null not valid after constructing subvector of strings
- Does C++ have a Garbage Collector?
- Is “argv[0] = name-of-executable” an accepted standard or just a common convention?
- How to fix ‘std::logic_error’ what(): basic_string::_M_construct null not valid error?
- gcc/g++: “No such file or directory”
- Error: expected type-specifier before ‘ClassName’
- General way of solving Error: Stack around the variable ‘x’ was corrupted
- error MSB3073: How do I fix this?
- timestamp of time(0) at multiple places in a C++ program
- What does “Permission denied” “Id returned 1 exit status” mean?
- When does an Incomplete Type error occur in C++
- std::cin input with spaces?
- extended initializer lists only available with
- how to initialize an empty integer array in c++
- What does |= mean in c++
- Error: cannot declare variable ‘c’ to be of abstract type ‘circle’
- Static linking vs dynamic linking
- What is object slicing?
- Java equivalent of cin (C++)
- g++ “because the following virtual functions are pure” with abstract base class
- C++ Exception thrown: read access violation. this was nullptr
- C++ getInt() function (have a java equivalent attached)
- Simple string parsing with C++
- member access within null pointer of type ‘struct ListNode’
- How does c++ represent negative value
- How well is Unicode supported in C++11?
- The CXX compiler identification is unknown
- Is there a standard sign function (signum, sgn) in C/C++?
- C++ compiler error: “return type specification for constructor invalid”
- error: ISO C++ forbids in-class initialization of non-const static member
- Function call missing argument list to create pointer
- cannot specify explicit initializer for arrays
- What does ** mean in C++?
- Incomplete type is not allowed: stringstream
- Make / gcc cryptic error 2: how to have more information?
- REGSVR32: the module “xxxxx.dll” failed to load … dependent assembly could not be found
- Error: expression cannot be used as a function?
- What is a .h.gch file?
- MinGW .exe requires a few gcc dll’s regardless of the code?
- Converting bool to text in C++
- clearing a vector of pointers [duplicate]
- Evaluate a string with a switch in C++ [duplicate]