Would C++ standard algorithms be faster if comparators were required to be strict total orderings rather than just strict weak orderings?

Many C++ standard algorithms, like std::sort(), assume that the comparator comp is a strict weak ordering and it cannot be assumed that comp has any another (nice) properties. But many times comp does have more properties than just being a strict weak ordering. In particular, many times comp is a strict total order (so in…

Details

opencv throws errors when building cap_avfoundation_mac

Compiling opencv on MacOS Mojave; everything was going well until make threw an error at cap_avfoundation_mac. Make complained about error: stray ‘@’ in program and then went on to throw a bunch of errors on files included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks. The errors go on for absolutely forever; however, most of them seem to be the same.…

Details

create a table within a CTE

I’d like to have a table that I can play around with, but that can be reference by the overall CTE CTE_MONTHS as ( DECLARE @MONTHS TABLE ([NUMBER] int, NAME varchar(max)) INSERT INTO @MONTHS select ([NUMBER],[NAME]) VALUES (‘1′ ,’JANUARY’) ,(‘2′ ,’FEBRUARY’) ,(‘3′ ,’MARCH’) ,(‘4′ ,’APRIL’) ,(‘5′ ,’MAY’) ,(‘6′ ,’JUNE’) ,(‘7′ ,’JULY’) ,(‘8′ ,’AUGUST’) ,(‘9′ ,’SEPTEMBER’)…

Details