<!DOCTYPE html>
<!-- saved from url=(0042)http://www.cjdb.com.au/wg21/concepts/d0800 -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Begin Jekyll SEO tag v2.3.0 -->
<title>wg21 | For documenting all WG21-related proposals</title>
<meta property="og:title" content="wg21">
<meta property="og:locale" content="en_US">
<meta name="description" content="For documenting all WG21-related proposals">
<meta property="og:description" content="For documenting all WG21-related proposals">
<link rel="canonical" href="http://www.cjdb.com.au/wg21/concepts/d0800.html">
<meta property="og:url" content="http://www.cjdb.com.au/wg21/concepts/d0800.html">
<meta property="og:site_name" content="wg21">
<script type="application/ld+json">
{"name":null,"description":"For documenting all WG21-related proposals","author":null,"@type":"WebPage","url":"http://www.cjdb.com.au/wg21/concepts/d0800.html","image":null,"publisher":null,"headline":"wg21","dateModified":null,"datePublished":null,"sameAs":null,"mainEntityOfPage":null,"@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->

	 <style class="anchorjs"></style>
	 <style>
		 /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}summary{display:list-item}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}template,[hidden]{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:0.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}*{box-sizing:border-box}input,select,textarea,button{font-family:inherit;font-size:inherit;line-height:inherit}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;line-height:1.5;color:#24292e;background-color:#fff}a{color:#0366d6;text-decoration:none}a:hover{text-decoration:underline}b,strong{font-weight:600}hr,.rule{height:0;margin:15px 0;overflow:hidden;background:transparent;border:0;border-bottom:1px solid #dfe2e5}hr::before,.rule::before{display:table;content:""}hr::after,.rule::after{display:table;clear:both;content:""}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}button{cursor:pointer}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0}h1{font-size:32px;font-weight:600}h2{font-size:24px;font-weight:600}h3{font-size:20px;font-weight:600}h4{font-size:16px;font-weight:600}h5{font-size:14px;font-weight:600}h6{font-size:12px;font-weight:600}p{margin-top:0;margin-bottom:10px}small{font-size:90%}blockquote{margin:0}ul,ol{padding-left:0;margin-top:0;margin-bottom:0}ol ol,ul ol{list-style-type:lower-roman}ul ul ol,ul ol ol,ol ul ol,ol ol ol{list-style-type:lower-alpha}dd{margin-left:0}tt,code{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}pre{margin-top:0;margin-bottom:0;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}.octicon{vertical-align:text-bottom}.anim-fade-in{animation-name:fade-in;animation-duration:1s;animation-timing-function:ease-in-out}.anim-fade-in.fast{animation-duration:300ms}@keyframes fade-in{0%{opacity:0}100%{opacity:1}}.anim-fade-up{opacity:0;animation-name:fade-up;animation-duration:0.3s;animation-fill-mode:forwards;animation-timing-function:ease-out;animation-delay:1s}@keyframes fade-up{0%{opacity:0.8;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}.anim-fade-down{animation-name:fade-down;animation-duration:0.3s;animation-fill-mode:forwards;animation-timing-function:ease-in}@keyframes fade-down{0%{opacity:1;transform:translateY(0)}100%{opacity:0.5;transform:translateY(100%)}}.anim-grow-x{width:0%;animation-name:grow-x;animation-duration:0.3s;animation-fill-mode:forwards;animation-timing-function:ease;animation-delay:0.5s}@keyframes grow-x{to{width:100%}}.anim-shrink-x{animation-name:shrink-x;animation-duration:0.3s;animation-fill-mode:forwards;animation-timing-function:ease-in-out;animation-delay:0.5s}@keyframes shrink-x{to{width:0%}}.anim-scale-in{animation-name:scale-in;animation-duration:0.15s;animation-timing-function:cubic-bezier(0.2, 0, 0.13, 1.5)}@keyframes scale-in{0%{opacity:0;transform:scale(0.5)}100%{opacity:1;transform:scale(1)}}.anim-pulse{animation-name:pulse;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}@keyframes pulse{0%{opacity:0.3}10%{opacity:1}100%{opacity:0.3}}.anim-pulse-in{animation-name:pulse-in;animation-duration:0.5s}@keyframes pulse-in{0%{transform:scale3d(1, 1, 1)}50%{transform:scale3d(1.1, 1.1, 1.1)}100%{transform:scale3d(1, 1, 1)}}.border{border:1px #e1e4e8 solid !important}.border-top{border-top:1px #e1e4e8 solid !important}.border-right{border-right:1px #e1e4e8 solid !important}.border-bottom{border-bottom:1px #e1e4e8 solid !important}.border-left{border-left:1px #e1e4e8 solid !important}.border-y{border-top:1px #e1e4e8 solid !important;border-bottom:1px #e1e4e8 solid !important}.border-dashed{border-style:dashed !important}.border-blue{border-color:#0366d6 !important}.border-blue-light{border-color:#c8e1ff !important}.border-green{border-color:#34d058 !important}.border-green-light{border-color:#a2cbac !important}.border-red{border-color:#d73a49 !important}.border-red-light{border-color:#cea0a5 !important}.border-purple{border-color:#6f42c1 !important}.border-yellow{border-color:#d9d0a5 !important}.border-gray-light{border-color:#eaecef !important}.border-gray-dark{border-color:#d1d5da !important}.border-black-fade{border-color:rgba(27,31,35,0.15) !important}.border-0{border:0 !important}.border-top-0{border-top:0 !important}.border-right-0{border-right:0 !important}.border-bottom-0{border-bottom:0 !important}.border-left-0{border-left:0 !important}.rounded-0{border-radius:0 !important}.rounded-1{border-radius:3px !important}.rounded-2{border-radius:6px !important}.box-shadow{box-shadow:0 1px 1px rgba(27,31,35,0.1) !important}.box-shadow-medium{box-shadow:0 1px 5px rgba(27,31,35,0.15) !important}.box-shadow-large{box-shadow:0 1px 15px rgba(27,31,35,0.15) !important}.box-shadow-extra-large{box-shadow:0 10px 50px rgba(27,31,35,0.07) !important}.box-shadow-none{box-shadow:none !important}.bg-white{background-color:#fff !important}.bg-blue{background-color:#0366d6 !important}.bg-blue-light{background-color:#f1f8ff !important}.bg-gray-dark{background-color:#24292e !important}.bg-gray{background-color:#f6f8fa !important}.bg-gray-light{background-color:#fafbfc !important}.bg-green{background-color:#28a745 !important}.bg-green-light{background-color:#dcffe4 !important}.bg-red{background-color:#d73a49 !important}.bg-red-light{background-color:#ffdce0 !important}.bg-yellow{background-color:#ffd33d !important}.bg-yellow-light{background-color:#fff5b1 !important}.bg-purple{background-color:#6f42c1 !important}.bg-purple-light{background-color:#f5f0ff !important}.bg-shade-gradient{background-image:linear-gradient(180deg, rgba(27,31,35,0.065), rgba(27,31,35,0)) !important;background-repeat:no-repeat !important;background-size:100% 200px !important}.text-blue{color:#0366d6 !important}.text-red{color:#cb2431 !important}.text-gray-light{color:#6a737d !important}.text-gray{color:#586069 !important}.text-gray-dark{color:#24292e !important}.text-green{color:#28a745 !important}.text-orange{color:#a04100 !important}.text-orange-light{color:#e36209 !important}.text-purple{color:#6f42c1 !important}.text-white{color:#fff !important}.text-inherit{color:inherit !important}.text-pending{color:#b08800 !important}.bg-pending{color:#dbab09 !important}.link-gray{color:#586069 !important}.link-gray:hover{color:#0366d6 !important}.link-gray-dark{color:#24292e !important}.link-gray-dark:hover{color:#0366d6 !important}.link-hover-blue:hover{color:#0366d6 !important}.muted-link{color:#586069 !important}.muted-link:hover{color:#0366d6 !important;text-decoration:none}.flex-row{flex-direction:row !important}.flex-row-reverse{flex-direction:row-reverse !important}.flex-column{flex-direction:column !important}.flex-wrap{flex-wrap:wrap !important}.flex-nowrap{flex-wrap:nowrap !important}.flex-justify-start{justify-content:flex-start !important}.flex-justify-end{justify-content:flex-end !important}.flex-justify-center{justify-content:center !important}.flex-justify-between{justify-content:space-between !important}.flex-justify-around{justify-content:space-around !important}.flex-items-start{align-items:flex-start !important}.flex-items-end{align-items:flex-end !important}.flex-items-center{align-items:center !important}.flex-items-baseline{align-items:baseline !important}.flex-items-stretch{align-items:stretch !important}.flex-content-start{align-content:flex-start !important}.flex-content-end{align-content:flex-end !important}.flex-content-center{align-content:center !important}.flex-content-between{align-content:space-between !important}.flex-content-around{align-content:space-around !important}.flex-content-stretch{align-content:stretch !important}.flex-auto{flex:1 1 auto !important}.flex-shrink-0{flex-shrink:0 !important}.flex-self-auto{align-self:auto !important}.flex-self-start{align-self:flex-start !important}.flex-self-end{align-self:flex-end !important}.flex-self-center{align-self:center !important}.flex-self-baseline{align-self:baseline !important}.flex-self-stretch{align-self:stretch !important}.flex-item-equal{flex-grow:1;flex-basis:0}@media (min-width: 544px){.flex-sm-row{flex-direction:row !important}.flex-sm-row-reverse{flex-direction:row-reverse !important}.flex-sm-column{flex-direction:column !important}.flex-sm-wrap{flex-wrap:wrap !important}.flex-sm-nowrap{flex-wrap:nowrap !important}.flex-sm-justify-start{justify-content:flex-start !important}.flex-sm-justify-end{justify-content:flex-end !important}.flex-sm-justify-center{justify-content:center !important}.flex-sm-justify-between{justify-content:space-between !important}.flex-sm-justify-around{justify-content:space-around !important}.flex-sm-items-start{align-items:flex-start !important}.flex-sm-items-end{align-items:flex-end !important}.flex-sm-items-center{align-items:center !important}.flex-sm-items-baseline{align-items:baseline !important}.flex-sm-items-stretch{align-items:stretch !important}.flex-sm-content-start{align-content:flex-start !important}.flex-sm-content-end{align-content:flex-end !important}.flex-sm-content-center{align-content:center !important}.flex-sm-content-between{align-content:space-between !important}.flex-sm-content-around{align-content:space-around !important}.flex-sm-content-stretch{align-content:stretch !important}.flex-sm-auto{flex:1 1 auto !important}.flex-sm-shrink-0{flex-shrink:0 !important}.flex-sm-self-auto{align-self:auto !important}.flex-sm-self-start{align-self:flex-start !important}.flex-sm-self-end{align-self:flex-end !important}.flex-sm-self-center{align-self:center !important}.flex-sm-self-baseline{align-self:baseline !important}.flex-sm-self-stretch{align-self:stretch !important}.flex-sm-item-equal{flex-grow:1;flex-basis:0}}@media (min-width: 768px){.flex-md-row{flex-direction:row !important}.flex-md-row-reverse{flex-direction:row-reverse !important}.flex-md-column{flex-direction:column !important}.flex-md-wrap{flex-wrap:wrap !important}.flex-md-nowrap{flex-wrap:nowrap !important}.flex-md-justify-start{justify-content:flex-start !important}.flex-md-justify-end{justify-content:flex-end !important}.flex-md-justify-center{justify-content:center !important}.flex-md-justify-between{justify-content:space-between !important}.flex-md-justify-around{justify-content:space-around !important}.flex-md-items-start{align-items:flex-start !important}.flex-md-items-end{align-items:flex-end !important}.flex-md-items-center{align-items:center !important}.flex-md-items-baseline{align-items:baseline !important}.flex-md-items-stretch{align-items:stretch !important}.flex-md-content-start{align-content:flex-start !important}.flex-md-content-end{align-content:flex-end !important}.flex-md-content-center{align-content:center !important}.flex-md-content-between{align-content:space-between !important}.flex-md-content-around{align-content:space-around !important}.flex-md-content-stretch{align-content:stretch !important}.flex-md-auto{flex:1 1 auto !important}.flex-md-shrink-0{flex-shrink:0 !important}.flex-md-self-auto{align-self:auto !important}.flex-md-self-start{align-self:flex-start !important}.flex-md-self-end{align-self:flex-end !important}.flex-md-self-center{align-self:center !important}.flex-md-self-baseline{align-self:baseline !important}.flex-md-self-stretch{align-self:stretch !important}.flex-md-item-equal{flex-grow:1;flex-basis:0}}@media (min-width: 1012px){.flex-lg-row{flex-direction:row !important}.flex-lg-row-reverse{flex-direction:row-reverse !important}.flex-lg-column{flex-direction:column !important}.flex-lg-wrap{flex-wrap:wrap !important}.flex-lg-nowrap{flex-wrap:nowrap !important}.flex-lg-justify-start{justify-content:flex-start !important}.flex-lg-justify-end{justify-content:flex-end !important}.flex-lg-justify-center{justify-content:center !important}.flex-lg-justify-between{justify-content:space-between !important}.flex-lg-justify-around{justify-content:space-around !important}.flex-lg-items-start{align-items:flex-start !important}.flex-lg-items-end{align-items:flex-end !important}.flex-lg-items-center{align-items:center !important}.flex-lg-items-baseline{align-items:baseline !important}.flex-lg-items-stretch{align-items:stretch !important}.flex-lg-content-start{align-content:flex-start !important}.flex-lg-content-end{align-content:flex-end !important}.flex-lg-content-center{align-content:center !important}.flex-lg-content-between{align-content:space-between !important}.flex-lg-content-around{align-content:space-around !important}.flex-lg-content-stretch{align-content:stretch !important}.flex-lg-auto{flex:1 1 auto !important}.flex-lg-shrink-0{flex-shrink:0 !important}.flex-lg-self-auto{align-self:auto !important}.flex-lg-self-start{align-self:flex-start !important}.flex-lg-self-end{align-self:flex-end !important}.flex-lg-self-center{align-self:center !important}.flex-lg-self-baseline{align-self:baseline !important}.flex-lg-self-stretch{align-self:stretch !important}.flex-lg-item-equal{flex-grow:1;flex-basis:0}}@media (min-width: 1280px){.flex-xl-row{flex-direction:row !important}.flex-xl-row-reverse{flex-direction:row-reverse !important}.flex-xl-column{flex-direction:column !important}.flex-xl-wrap{flex-wrap:wrap !important}.flex-xl-nowrap{flex-wrap:nowrap !important}.flex-xl-justify-start{justify-content:flex-start !important}.flex-xl-justify-end{justify-content:flex-end !important}.flex-xl-justify-center{justify-content:center !important}.flex-xl-justify-between{justify-content:space-between !important}.flex-xl-justify-around{justify-content:space-around !important}.flex-xl-items-start{align-items:flex-start !important}.flex-xl-items-end{align-items:flex-end !important}.flex-xl-items-center{align-items:center !important}.flex-xl-items-baseline{align-items:baseline !important}.flex-xl-items-stretch{align-items:stretch !important}.flex-xl-content-start{align-content:flex-start !important}.flex-xl-content-end{align-content:flex-end !important}.flex-xl-content-center{align-content:center !important}.flex-xl-content-between{align-content:space-between !important}.flex-xl-content-around{align-content:space-around !important}.flex-xl-content-stretch{align-content:stretch !important}.flex-xl-auto{flex:1 1 auto !important}.flex-xl-shrink-0{flex-shrink:0 !important}.flex-xl-self-auto{align-self:auto !important}.flex-xl-self-start{align-self:flex-start !important}.flex-xl-self-end{align-self:flex-end !important}.flex-xl-self-center{align-self:center !important}.flex-xl-self-baseline{align-self:baseline !important}.flex-xl-self-stretch{align-self:stretch !important}.flex-xl-item-equal{flex-grow:1;flex-basis:0}}.position-static{position:static !important}.position-relative{position:relative !important}.position-absolute{position:absolute !important}.position-fixed{position:fixed !important}.top-0{top:0 !important}.right-0{right:0 !important}.bottom-0{bottom:0 !important}.left-0{left:0 !important}.v-align-middle{vertical-align:middle !important}.v-align-top{vertical-align:top !important}.v-align-bottom{vertical-align:bottom !important}.v-align-text-top{vertical-align:text-top !important}.v-align-text-bottom{vertical-align:text-bottom !important}.overflow-hidden{overflow:hidden !important}.overflow-scroll{overflow:scroll !important}.overflow-auto{overflow:auto !important}.clearfix::before{display:table;content:""}.clearfix::after{display:table;clear:both;content:""}.float-right{float:right !important}.float-left{float:left !important}.float-none{float:none !important}@media (min-width: 544px){.float-sm-left{float:left !important}.float-sm-right{float:right !important}.float-sm-none{float:none !important}}@media (min-width: 768px){.float-md-left{float:left !important}.float-md-right{float:right !important}.float-md-none{float:none !important}}@media (min-width: 1012px){.float-lg-left{float:left !important}.float-lg-right{float:right !important}.float-lg-none{float:none !important}}@media (min-width: 1280px){.float-xl-left{float:left !important}.float-xl-right{float:right !important}.float-xl-none{float:none !important}}.width-fit{max-width:100% !important}.width-full{width:100% !important}.height-full{height:100% !important}.min-width-0{min-width:0 !important}.direction-rtl{direction:rtl !important}.direction-ltr{direction:ltr !important}@media (min-width: 544px){.direction-sm-rtl{direction:rtl !important}.direction-sm-ltr{direction:ltr !important}}@media (min-width: 768px){.direction-md-rtl{direction:rtl !important}.direction-md-ltr{direction:ltr !important}}@media (min-width: 1012px){.direction-lg-rtl{direction:rtl !important}.direction-lg-ltr{direction:ltr !important}}@media (min-width: 1280px){.direction-xl-rtl{direction:rtl !important}.direction-xl-ltr{direction:ltr !important}}.m-0{margin:0 !important}.mt-0{margin-top:0 !important}.mr-0{margin-right:0 !important}.mb-0{margin-bottom:0 !important}.ml-0{margin-left:0 !important}.mt-n0{margin-top:-0 !important}.mr-n0{margin-right:-0 !important}.mb-n0{margin-bottom:-0 !important}.ml-n0{margin-left:-0 !important}.mx-0{margin-right:0 !important;margin-left:0 !important}.my-0{margin-top:0 !important;margin-bottom:0 !important}.m-1{margin:4px !important}.mt-1{margin-top:4px !important}.mr-1{margin-right:4px !important}.mb-1{margin-bottom:4px !important}.ml-1{margin-left:4px !important}.mt-n1{margin-top:-4px !important}.mr-n1{margin-right:-4px !important}.mb-n1{margin-bottom:-4px !important}.ml-n1{margin-left:-4px !important}.mx-1{margin-right:4px !important;margin-left:4px !important}.my-1{margin-top:4px !important;margin-bottom:4px !important}.m-2{margin:8px !important}.mt-2{margin-top:8px !important}.mr-2{margin-right:8px !important}.mb-2{margin-bottom:8px !important}.ml-2{margin-left:8px !important}.mt-n2{margin-top:-8px !important}.mr-n2{margin-right:-8px !important}.mb-n2{margin-bottom:-8px !important}.ml-n2{margin-left:-8px !important}.mx-2{margin-right:8px !important;margin-left:8px !important}.my-2{margin-top:8px !important;margin-bottom:8px !important}.m-3{margin:16px !important}.mt-3{margin-top:16px !important}.mr-3{margin-right:16px !important}.mb-3{margin-bottom:16px !important}.ml-3{margin-left:16px !important}.mt-n3{margin-top:-16px !important}.mr-n3{margin-right:-16px !important}.mb-n3{margin-bottom:-16px !important}.ml-n3{margin-left:-16px !important}.mx-3{margin-right:16px !important;margin-left:16px !important}.my-3{margin-top:16px !important;margin-bottom:16px !important}.m-4{margin:24px !important}.mt-4{margin-top:24px !important}.mr-4{margin-right:24px !important}.mb-4{margin-bottom:24px !important}.ml-4{margin-left:24px !important}.mt-n4{margin-top:-24px !important}.mr-n4{margin-right:-24px !important}.mb-n4{margin-bottom:-24px !important}.ml-n4{margin-left:-24px !important}.mx-4{margin-right:24px !important;margin-left:24px !important}.my-4{margin-top:24px !important;margin-bottom:24px !important}.m-5{margin:32px !important}.mt-5{margin-top:32px !important}.mr-5{margin-right:32px !important}.mb-5{margin-bottom:32px !important}.ml-5{margin-left:32px !important}.mt-n5{margin-top:-32px !important}.mr-n5{margin-right:-32px !important}.mb-n5{margin-bottom:-32px !important}.ml-n5{margin-left:-32px !important}.mx-5{margin-right:32px !important;margin-left:32px !important}.my-5{margin-top:32px !important;margin-bottom:32px !important}.m-6{margin:40px !important}.mt-6{margin-top:40px !important}.mr-6{margin-right:40px !important}.mb-6{margin-bottom:40px !important}.ml-6{margin-left:40px !important}.mt-n6{margin-top:-40px !important}.mr-n6{margin-right:-40px !important}.mb-n6{margin-bottom:-40px !important}.ml-n6{margin-left:-40px !important}.mx-6{margin-right:40px !important;margin-left:40px !important}.my-6{margin-top:40px !important;margin-bottom:40px !important}.mx-auto{margin-right:auto !important;margin-left:auto !important}@media (min-width: 544px){.m-sm-0{margin:0 !important}.mt-sm-0{margin-top:0 !important}.mr-sm-0{margin-right:0 !important}.mb-sm-0{margin-bottom:0 !important}.ml-sm-0{margin-left:0 !important}.mt-sm-n0{margin-top:-0 !important}.mr-sm-n0{margin-right:-0 !important}.mb-sm-n0{margin-bottom:-0 !important}.ml-sm-n0{margin-left:-0 !important}.mx-sm-0{margin-right:0 !important;margin-left:0 !important}.my-sm-0{margin-top:0 !important;margin-bottom:0 !important}}@media (min-width: 544px){.m-sm-1{margin:4px !important}.mt-sm-1{margin-top:4px !important}.mr-sm-1{margin-right:4px !important}.mb-sm-1{margin-bottom:4px !important}.ml-sm-1{margin-left:4px !important}.mt-sm-n1{margin-top:-4px !important}.mr-sm-n1{margin-right:-4px !important}.mb-sm-n1{margin-bottom:-4px !important}.ml-sm-n1{margin-left:-4px !important}.mx-sm-1{margin-right:4px !important;margin-left:4px !important}.my-sm-1{margin-top:4px !important;margin-bottom:4px !important}}@media (min-width: 544px){.m-sm-2{margin:8px !important}.mt-sm-2{margin-top:8px !important}.mr-sm-2{margin-right:8px !important}.mb-sm-2{margin-bottom:8px !important}.ml-sm-2{margin-left:8px !important}.mt-sm-n2{margin-top:-8px !important}.mr-sm-n2{margin-right:-8px !important}.mb-sm-n2{margin-bottom:-8px !important}.ml-sm-n2{margin-left:-8px !important}.mx-sm-2{margin-right:8px !important;margin-left:8px !important}.my-sm-2{margin-top:8px !important;margin-bottom:8px !important}}@media (min-width: 544px){.m-sm-3{margin:16px !important}.mt-sm-3{margin-top:16px !important}.mr-sm-3{margin-right:16px !important}.mb-sm-3{margin-bottom:16px !important}.ml-sm-3{margin-left:16px !important}.mt-sm-n3{margin-top:-16px !important}.mr-sm-n3{margin-right:-16px !important}.mb-sm-n3{margin-bottom:-16px !important}.ml-sm-n3{margin-left:-16px !important}.mx-sm-3{margin-right:16px !important;margin-left:16px !important}.my-sm-3{margin-top:16px !important;margin-bottom:16px !important}}@media (min-width: 544px){.m-sm-4{margin:24px !important}.mt-sm-4{margin-top:24px !important}.mr-sm-4{margin-right:24px !important}.mb-sm-4{margin-bottom:24px !important}.ml-sm-4{margin-left:24px !important}.mt-sm-n4{margin-top:-24px !important}.mr-sm-n4{margin-right:-24px !important}.mb-sm-n4{margin-bottom:-24px !important}.ml-sm-n4{margin-left:-24px !important}.mx-sm-4{margin-right:24px !important;margin-left:24px !important}.my-sm-4{margin-top:24px !important;margin-bottom:24px !important}}@media (min-width: 544px){.m-sm-5{margin:32px !important}.mt-sm-5{margin-top:32px !important}.mr-sm-5{margin-right:32px !important}.mb-sm-5{margin-bottom:32px !important}.ml-sm-5{margin-left:32px !important}.mt-sm-n5{margin-top:-32px !important}.mr-sm-n5{margin-right:-32px !important}.mb-sm-n5{margin-bottom:-32px !important}.ml-sm-n5{margin-left:-32px !important}.mx-sm-5{margin-right:32px !important;margin-left:32px !important}.my-sm-5{margin-top:32px !important;margin-bottom:32px !important}}@media (min-width: 544px){.m-sm-6{margin:40px !important}.mt-sm-6{margin-top:40px !important}.mr-sm-6{margin-right:40px !important}.mb-sm-6{margin-bottom:40px !important}.ml-sm-6{margin-left:40px !important}.mt-sm-n6{margin-top:-40px !important}.mr-sm-n6{margin-right:-40px !important}.mb-sm-n6{margin-bottom:-40px !important}.ml-sm-n6{margin-left:-40px !important}.mx-sm-6{margin-right:40px !important;margin-left:40px !important}.my-sm-6{margin-top:40px !important;margin-bottom:40px !important}}@media (min-width: 768px){.m-md-0{margin:0 !important}.mt-md-0{margin-top:0 !important}.mr-md-0{margin-right:0 !important}.mb-md-0{margin-bottom:0 !important}.ml-md-0{margin-left:0 !important}.mt-md-n0{margin-top:-0 !important}.mr-md-n0{margin-right:-0 !important}.mb-md-n0{margin-bottom:-0 !important}.ml-md-n0{margin-left:-0 !important}.mx-md-0{margin-right:0 !important;margin-left:0 !important}.my-md-0{margin-top:0 !important;margin-bottom:0 !important}}@media (min-width: 768px){.m-md-1{margin:4px !important}.mt-md-1{margin-top:4px !important}.mr-md-1{margin-right:4px !important}.mb-md-1{margin-bottom:4px !important}.ml-md-1{margin-left:4px !important}.mt-md-n1{margin-top:-4px !important}.mr-md-n1{margin-right:-4px !important}.mb-md-n1{margin-bottom:-4px !important}.ml-md-n1{margin-left:-4px !important}.mx-md-1{margin-right:4px !important;margin-left:4px !important}.my-md-1{margin-top:4px !important;margin-bottom:4px !important}}@media (min-width: 768px){.m-md-2{margin:8px !important}.mt-md-2{margin-top:8px !important}.mr-md-2{margin-right:8px !important}.mb-md-2{margin-bottom:8px !important}.ml-md-2{margin-left:8px !important}.mt-md-n2{margin-top:-8px !important}.mr-md-n2{margin-right:-8px !important}.mb-md-n2{margin-bottom:-8px !important}.ml-md-n2{margin-left:-8px !important}.mx-md-2{margin-right:8px !important;margin-left:8px !important}.my-md-2{margin-top:8px !important;margin-bottom:8px !important}}@media (min-width: 768px){.m-md-3{margin:16px !important}.mt-md-3{margin-top:16px !important}.mr-md-3{margin-right:16px !important}.mb-md-3{margin-bottom:16px !important}.ml-md-3{margin-left:16px !important}.mt-md-n3{margin-top:-16px !important}.mr-md-n3{margin-right:-16px !important}.mb-md-n3{margin-bottom:-16px !important}.ml-md-n3{margin-left:-16px !important}.mx-md-3{margin-right:16px !important;margin-left:16px !important}.my-md-3{margin-top:16px !important;margin-bottom:16px !important}}@media (min-width: 768px){.m-md-4{margin:24px !important}.mt-md-4{margin-top:24px !important}.mr-md-4{margin-right:24px !important}.mb-md-4{margin-bottom:24px !important}.ml-md-4{margin-left:24px !important}.mt-md-n4{margin-top:-24px !important}.mr-md-n4{margin-right:-24px !important}.mb-md-n4{margin-bottom:-24px !important}.ml-md-n4{margin-left:-24px !important}.mx-md-4{margin-right:24px !important;margin-left:24px !important}.my-md-4{margin-top:24px !important;margin-bottom:24px !important}}@media (min-width: 768px){.m-md-5{margin:32px !important}.mt-md-5{margin-top:32px !important}.mr-md-5{margin-right:32px !important}.mb-md-5{margin-bottom:32px !important}.ml-md-5{margin-left:32px !important}.mt-md-n5{margin-top:-32px !important}.mr-md-n5{margin-right:-32px !important}.mb-md-n5{margin-bottom:-32px !important}.ml-md-n5{margin-left:-32px !important}.mx-md-5{margin-right:32px !important;margin-left:32px !important}.my-md-5{margin-top:32px !important;margin-bottom:32px !important}}@media (min-width: 768px){.m-md-6{margin:40px !important}.mt-md-6{margin-top:40px !important}.mr-md-6{margin-right:40px !important}.mb-md-6{margin-bottom:40px !important}.ml-md-6{margin-left:40px !important}.mt-md-n6{margin-top:-40px !important}.mr-md-n6{margin-right:-40px !important}.mb-md-n6{margin-bottom:-40px !important}.ml-md-n6{margin-left:-40px !important}.mx-md-6{margin-right:40px !important;margin-left:40px !important}.my-md-6{margin-top:40px !important;margin-bottom:40px !important}}@media (min-width: 1012px){.m-lg-0{margin:0 !important}.mt-lg-0{margin-top:0 !important}.mr-lg-0{margin-right:0 !important}.mb-lg-0{margin-bottom:0 !important}.ml-lg-0{margin-left:0 !important}.mt-lg-n0{margin-top:-0 !important}.mr-lg-n0{margin-right:-0 !important}.mb-lg-n0{margin-bottom:-0 !important}.ml-lg-n0{margin-left:-0 !important}.mx-lg-0{margin-right:0 !important;margin-left:0 !important}.my-lg-0{margin-top:0 !important;margin-bottom:0 !important}}@media (min-width: 1012px){.m-lg-1{margin:4px !important}.mt-lg-1{margin-top:4px !important}.mr-lg-1{margin-right:4px !important}.mb-lg-1{margin-bottom:4px !important}.ml-lg-1{margin-left:4px !important}.mt-lg-n1{margin-top:-4px !important}.mr-lg-n1{margin-right:-4px !important}.mb-lg-n1{margin-bottom:-4px !important}.ml-lg-n1{margin-left:-4px !important}.mx-lg-1{margin-right:4px !important;margin-left:4px !important}.my-lg-1{margin-top:4px !important;margin-bottom:4px !important}}@media (min-width: 1012px){.m-lg-2{margin:8px !important}.mt-lg-2{margin-top:8px !important}.mr-lg-2{margin-right:8px !important}.mb-lg-2{margin-bottom:8px !important}.ml-lg-2{margin-left:8px !important}.mt-lg-n2{margin-top:-8px !important}.mr-lg-n2{margin-right:-8px !important}.mb-lg-n2{margin-bottom:-8px !important}.ml-lg-n2{margin-left:-8px !important}.mx-lg-2{margin-right:8px !important;margin-left:8px !important}.my-lg-2{margin-top:8px !important;margin-bottom:8px !important}}@media (min-width: 1012px){.m-lg-3{margin:16px !important}.mt-lg-3{margin-top:16px !important}.mr-lg-3{margin-right:16px !important}.mb-lg-3{margin-bottom:16px !important}.ml-lg-3{margin-left:16px !important}.mt-lg-n3{margin-top:-16px !important}.mr-lg-n3{margin-right:-16px !important}.mb-lg-n3{margin-bottom:-16px !important}.ml-lg-n3{margin-left:-16px !important}.mx-lg-3{margin-right:16px !important;margin-left:16px !important}.my-lg-3{margin-top:16px !important;margin-bottom:16px !important}}@media (min-width: 1012px){.m-lg-4{margin:24px !important}.mt-lg-4{margin-top:24px !important}.mr-lg-4{margin-right:24px !important}.mb-lg-4{margin-bottom:24px !important}.ml-lg-4{margin-left:24px !important}.mt-lg-n4{margin-top:-24px !important}.mr-lg-n4{margin-right:-24px !important}.mb-lg-n4{margin-bottom:-24px !important}.ml-lg-n4{margin-left:-24px !important}.mx-lg-4{margin-right:24px !important;margin-left:24px !important}.my-lg-4{margin-top:24px !important;margin-bottom:24px !important}}@media (min-width: 1012px){.m-lg-5{margin:32px !important}.mt-lg-5{margin-top:32px !important}.mr-lg-5{margin-right:32px !important}.mb-lg-5{margin-bottom:32px !important}.ml-lg-5{margin-left:32px !important}.mt-lg-n5{margin-top:-32px !important}.mr-lg-n5{margin-right:-32px !important}.mb-lg-n5{margin-bottom:-32px !important}.ml-lg-n5{margin-left:-32px !important}.mx-lg-5{margin-right:32px !important;margin-left:32px !important}.my-lg-5{margin-top:32px !important;margin-bottom:32px !important}}@media (min-width: 1012px){.m-lg-6{margin:40px !important}.mt-lg-6{margin-top:40px !important}.mr-lg-6{margin-right:40px !important}.mb-lg-6{margin-bottom:40px !important}.ml-lg-6{margin-left:40px !important}.mt-lg-n6{margin-top:-40px !important}.mr-lg-n6{margin-right:-40px !important}.mb-lg-n6{margin-bottom:-40px !important}.ml-lg-n6{margin-left:-40px !important}.mx-lg-6{margin-right:40px !important;margin-left:40px !important}.my-lg-6{margin-top:40px !important;margin-bottom:40px !important}}@media (min-width: 1280px){.m-xl-0{margin:0 !important}.mt-xl-0{margin-top:0 !important}.mr-xl-0{margin-right:0 !important}.mb-xl-0{margin-bottom:0 !important}.ml-xl-0{margin-left:0 !important}.mt-xl-n0{margin-top:-0 !important}.mr-xl-n0{margin-right:-0 !important}.mb-xl-n0{margin-bottom:-0 !important}.ml-xl-n0{margin-left:-0 !important}.mx-xl-0{margin-right:0 !important;margin-left:0 !important}.my-xl-0{margin-top:0 !important;margin-bottom:0 !important}}@media (min-width: 1280px){.m-xl-1{margin:4px !important}.mt-xl-1{margin-top:4px !important}.mr-xl-1{margin-right:4px !important}.mb-xl-1{margin-bottom:4px !important}.ml-xl-1{margin-left:4px !important}.mt-xl-n1{margin-top:-4px !important}.mr-xl-n1{margin-right:-4px !important}.mb-xl-n1{margin-bottom:-4px !important}.ml-xl-n1{margin-left:-4px !important}.mx-xl-1{margin-right:4px !important;margin-left:4px !important}.my-xl-1{margin-top:4px !important;margin-bottom:4px !important}}@media (min-width: 1280px){.m-xl-2{margin:8px !important}.mt-xl-2{margin-top:8px !important}.mr-xl-2{margin-right:8px !important}.mb-xl-2{margin-bottom:8px !important}.ml-xl-2{margin-left:8px !important}.mt-xl-n2{margin-top:-8px !important}.mr-xl-n2{margin-right:-8px !important}.mb-xl-n2{margin-bottom:-8px !important}.ml-xl-n2{margin-left:-8px !important}.mx-xl-2{margin-right:8px !important;margin-left:8px !important}.my-xl-2{margin-top:8px !important;margin-bottom:8px !important}}@media (min-width: 1280px){.m-xl-3{margin:16px !important}.mt-xl-3{margin-top:16px !important}.mr-xl-3{margin-right:16px !important}.mb-xl-3{margin-bottom:16px !important}.ml-xl-3{margin-left:16px !important}.mt-xl-n3{margin-top:-16px !important}.mr-xl-n3{margin-right:-16px !important}.mb-xl-n3{margin-bottom:-16px !important}.ml-xl-n3{margin-left:-16px !important}.mx-xl-3{margin-right:16px !important;margin-left:16px !important}.my-xl-3{margin-top:16px !important;margin-bottom:16px !important}}@media (min-width: 1280px){.m-xl-4{margin:24px !important}.mt-xl-4{margin-top:24px !important}.mr-xl-4{margin-right:24px !important}.mb-xl-4{margin-bottom:24px !important}.ml-xl-4{margin-left:24px !important}.mt-xl-n4{margin-top:-24px !important}.mr-xl-n4{margin-right:-24px !important}.mb-xl-n4{margin-bottom:-24px !important}.ml-xl-n4{margin-left:-24px !important}.mx-xl-4{margin-right:24px !important;margin-left:24px !important}.my-xl-4{margin-top:24px !important;margin-bottom:24px !important}}@media (min-width: 1280px){.m-xl-5{margin:32px !important}.mt-xl-5{margin-top:32px !important}.mr-xl-5{margin-right:32px !important}.mb-xl-5{margin-bottom:32px !important}.ml-xl-5{margin-left:32px !important}.mt-xl-n5{margin-top:-32px !important}.mr-xl-n5{margin-right:-32px !important}.mb-xl-n5{margin-bottom:-32px !important}.ml-xl-n5{margin-left:-32px !important}.mx-xl-5{margin-right:32px !important;margin-left:32px !important}.my-xl-5{margin-top:32px !important;margin-bottom:32px !important}}@media (min-width: 1280px){.m-xl-6{margin:40px !important}.mt-xl-6{margin-top:40px !important}.mr-xl-6{margin-right:40px !important}.mb-xl-6{margin-bottom:40px !important}.ml-xl-6{margin-left:40px !important}.mt-xl-n6{margin-top:-40px !important}.mr-xl-n6{margin-right:-40px !important}.mb-xl-n6{margin-bottom:-40px !important}.ml-xl-n6{margin-left:-40px !important}.mx-xl-6{margin-right:40px !important;margin-left:40px !important}.my-xl-6{margin-top:40px !important;margin-bottom:40px !important}}.p-0{padding:0 !important}.pt-0{padding-top:0 !important}.pr-0{padding-right:0 !important}.pb-0{padding-bottom:0 !important}.pl-0{padding-left:0 !important}.px-0{padding-right:0 !important;padding-left:0 !important}.py-0{padding-top:0 !important;padding-bottom:0 !important}.p-1{padding:4px !important}.pt-1{padding-top:4px !important}.pr-1{padding-right:4px !important}.pb-1{padding-bottom:4px !important}.pl-1{padding-left:4px !important}.px-1{padding-right:4px !important;padding-left:4px !important}.py-1{padding-top:4px !important;padding-bottom:4px !important}.p-2{padding:8px !important}.pt-2{padding-top:8px !important}.pr-2{padding-right:8px !important}.pb-2{padding-bottom:8px !important}.pl-2{padding-left:8px !important}.px-2{padding-right:8px !important;padding-left:8px !important}.py-2{padding-top:8px !important;padding-bottom:8px !important}.p-3{padding:16px !important}.pt-3{padding-top:16px !important}.pr-3{padding-right:16px !important}.pb-3{padding-bottom:16px !important}.pl-3{padding-left:16px !important}.px-3{padding-right:16px !important;padding-left:16px !important}.py-3{padding-top:16px !important;padding-bottom:16px !important}.p-4{padding:24px !important}.pt-4{padding-top:24px !important}.pr-4{padding-right:24px !important}.pb-4{padding-bottom:24px !important}.pl-4{padding-left:24px !important}.px-4{padding-right:24px !important;padding-left:24px !important}.py-4{padding-top:24px !important;padding-bottom:24px !important}.p-5{padding:32px !important}.pt-5{padding-top:32px !important}.pr-5{padding-right:32px !important}.pb-5{padding-bottom:32px !important}.pl-5{padding-left:32px !important}.px-5{padding-right:32px !important;padding-left:32px !important}.py-5{padding-top:32px !important;padding-bottom:32px !important}.p-6{padding:40px !important}.pt-6{padding-top:40px !important}.pr-6{padding-right:40px !important}.pb-6{padding-bottom:40px !important}.pl-6{padding-left:40px !important}.px-6{padding-right:40px !important;padding-left:40px !important}.py-6{padding-top:40px !important;padding-bottom:40px !important}@media (min-width: 544px){.p-sm-0{padding:0 !important}.pt-sm-0{padding-top:0 !important}.pr-sm-0{padding-right:0 !important}.pb-sm-0{padding-bottom:0 !important}.pl-sm-0{padding-left:0 !important}.px-sm-0{padding-right:0 !important;padding-left:0 !important}.py-sm-0{padding-top:0 !important;padding-bottom:0 !important}}@media (min-width: 544px){.p-sm-1{padding:4px !important}.pt-sm-1{padding-top:4px !important}.pr-sm-1{padding-right:4px !important}.pb-sm-1{padding-bottom:4px !important}.pl-sm-1{padding-left:4px !important}.px-sm-1{padding-right:4px !important;padding-left:4px !important}.py-sm-1{padding-top:4px !important;padding-bottom:4px !important}}@media (min-width: 544px){.p-sm-2{padding:8px !important}.pt-sm-2{padding-top:8px !important}.pr-sm-2{padding-right:8px !important}.pb-sm-2{padding-bottom:8px !important}.pl-sm-2{padding-left:8px !important}.px-sm-2{padding-right:8px !important;padding-left:8px !important}.py-sm-2{padding-top:8px !important;padding-bottom:8px !important}}@media (min-width: 544px){.p-sm-3{padding:16px !important}.pt-sm-3{padding-top:16px !important}.pr-sm-3{padding-right:16px !important}.pb-sm-3{padding-bottom:16px !important}.pl-sm-3{padding-left:16px !important}.px-sm-3{padding-right:16px !important;padding-left:16px !important}.py-sm-3{padding-top:16px !important;padding-bottom:16px !important}}@media (min-width: 544px){.p-sm-4{padding:24px !important}.pt-sm-4{padding-top:24px !important}.pr-sm-4{padding-right:24px !important}.pb-sm-4{padding-bottom:24px !important}.pl-sm-4{padding-left:24px !important}.px-sm-4{padding-right:24px !important;padding-left:24px !important}.py-sm-4{padding-top:24px !important;padding-bottom:24px !important}}@media (min-width: 544px){.p-sm-5{padding:32px !important}.pt-sm-5{padding-top:32px !important}.pr-sm-5{padding-right:32px !important}.pb-sm-5{padding-bottom:32px !important}.pl-sm-5{padding-left:32px !important}.px-sm-5{padding-right:32px !important;padding-left:32px !important}.py-sm-5{padding-top:32px !important;padding-bottom:32px !important}}@media (min-width: 544px){.p-sm-6{padding:40px !important}.pt-sm-6{padding-top:40px !important}.pr-sm-6{padding-right:40px !important}.pb-sm-6{padding-bottom:40px !important}.pl-sm-6{padding-left:40px !important}.px-sm-6{padding-right:40px !important;padding-left:40px !important}.py-sm-6{padding-top:40px !important;padding-bottom:40px !important}}@media (min-width: 768px){.p-md-0{padding:0 !important}.pt-md-0{padding-top:0 !important}.pr-md-0{padding-right:0 !important}.pb-md-0{padding-bottom:0 !important}.pl-md-0{padding-left:0 !important}.px-md-0{padding-right:0 !important;padding-left:0 !important}.py-md-0{padding-top:0 !important;padding-bottom:0 !important}}@media (min-width: 768px){.p-md-1{padding:4px !important}.pt-md-1{padding-top:4px !important}.pr-md-1{padding-right:4px !important}.pb-md-1{padding-bottom:4px !important}.pl-md-1{padding-left:4px !important}.px-md-1{padding-right:4px !important;padding-left:4px !important}.py-md-1{padding-top:4px !important;padding-bottom:4px !important}}@media (min-width: 768px){.p-md-2{padding:8px !important}.pt-md-2{padding-top:8px !important}.pr-md-2{padding-right:8px !important}.pb-md-2{padding-bottom:8px !important}.pl-md-2{padding-left:8px !important}.px-md-2{padding-right:8px !important;padding-left:8px !important}.py-md-2{padding-top:8px !important;padding-bottom:8px !important}}@media (min-width: 768px){.p-md-3{padding:16px !important}.pt-md-3{padding-top:16px !important}.pr-md-3{padding-right:16px !important}.pb-md-3{padding-bottom:16px !important}.pl-md-3{padding-left:16px !important}.px-md-3{padding-right:16px !important;padding-left:16px !important}.py-md-3{padding-top:16px !important;padding-bottom:16px !important}}@media (min-width: 768px){.p-md-4{padding:24px !important}.pt-md-4{padding-top:24px !important}.pr-md-4{padding-right:24px !important}.pb-md-4{padding-bottom:24px !important}.pl-md-4{padding-left:24px !important}.px-md-4{padding-right:24px !important;padding-left:24px !important}.py-md-4{padding-top:24px !important;padding-bottom:24px !important}}@media (min-width: 768px){.p-md-5{padding:32px !important}.pt-md-5{padding-top:32px !important}.pr-md-5{padding-right:32px !important}.pb-md-5{padding-bottom:32px !important}.pl-md-5{padding-left:32px !important}.px-md-5{padding-right:32px !important;padding-left:32px !important}.py-md-5{padding-top:32px !important;padding-bottom:32px !important}}@media (min-width: 768px){.p-md-6{padding:40px !important}.pt-md-6{padding-top:40px !important}.pr-md-6{padding-right:40px !important}.pb-md-6{padding-bottom:40px !important}.pl-md-6{padding-left:40px !important}.px-md-6{padding-right:40px !important;padding-left:40px !important}.py-md-6{padding-top:40px !important;padding-bottom:40px !important}}@media (min-width: 1012px){.p-lg-0{padding:0 !important}.pt-lg-0{padding-top:0 !important}.pr-lg-0{padding-right:0 !important}.pb-lg-0{padding-bottom:0 !important}.pl-lg-0{padding-left:0 !important}.px-lg-0{padding-right:0 !important;padding-left:0 !important}.py-lg-0{padding-top:0 !important;padding-bottom:0 !important}}@media (min-width: 1012px){.p-lg-1{padding:4px !important}.pt-lg-1{padding-top:4px !important}.pr-lg-1{padding-right:4px !important}.pb-lg-1{padding-bottom:4px !important}.pl-lg-1{padding-left:4px !important}.px-lg-1{padding-right:4px !important;padding-left:4px !important}.py-lg-1{padding-top:4px !important;padding-bottom:4px !important}}@media (min-width: 1012px){.p-lg-2{padding:8px !important}.pt-lg-2{padding-top:8px !important}.pr-lg-2{padding-right:8px !important}.pb-lg-2{padding-bottom:8px !important}.pl-lg-2{padding-left:8px !important}.px-lg-2{padding-right:8px !important;padding-left:8px !important}.py-lg-2{padding-top:8px !important;padding-bottom:8px !important}}@media (min-width: 1012px){.p-lg-3{padding:16px !important}.pt-lg-3{padding-top:16px !important}.pr-lg-3{padding-right:16px !important}.pb-lg-3{padding-bottom:16px !important}.pl-lg-3{padding-left:16px !important}.px-lg-3{padding-right:16px !important;padding-left:16px !important}.py-lg-3{padding-top:16px !important;padding-bottom:16px !important}}@media (min-width: 1012px){.p-lg-4{padding:24px !important}.pt-lg-4{padding-top:24px !important}.pr-lg-4{padding-right:24px !important}.pb-lg-4{padding-bottom:24px !important}.pl-lg-4{padding-left:24px !important}.px-lg-4{padding-right:24px !important;padding-left:24px !important}.py-lg-4{padding-top:24px !important;padding-bottom:24px !important}}@media (min-width: 1012px){.p-lg-5{padding:32px !important}.pt-lg-5{padding-top:32px !important}.pr-lg-5{padding-right:32px !important}.pb-lg-5{padding-bottom:32px !important}.pl-lg-5{padding-left:32px !important}.px-lg-5{padding-right:32px !important;padding-left:32px !important}.py-lg-5{padding-top:32px !important;padding-bottom:32px !important}}@media (min-width: 1012px){.p-lg-6{padding:40px !important}.pt-lg-6{padding-top:40px !important}.pr-lg-6{padding-right:40px !important}.pb-lg-6{padding-bottom:40px !important}.pl-lg-6{padding-left:40px !important}.px-lg-6{padding-right:40px !important;padding-left:40px !important}.py-lg-6{padding-top:40px !important;padding-bottom:40px !important}}@media (min-width: 1280px){.p-xl-0{padding:0 !important}.pt-xl-0{padding-top:0 !important}.pr-xl-0{padding-right:0 !important}.pb-xl-0{padding-bottom:0 !important}.pl-xl-0{padding-left:0 !important}.px-xl-0{padding-right:0 !important;padding-left:0 !important}.py-xl-0{padding-top:0 !important;padding-bottom:0 !important}}@media (min-width: 1280px){.p-xl-1{padding:4px !important}.pt-xl-1{padding-top:4px !important}.pr-xl-1{padding-right:4px !important}.pb-xl-1{padding-bottom:4px !important}.pl-xl-1{padding-left:4px !important}.px-xl-1{padding-right:4px !important;padding-left:4px !important}.py-xl-1{padding-top:4px !important;padding-bottom:4px !important}}@media (min-width: 1280px){.p-xl-2{padding:8px !important}.pt-xl-2{padding-top:8px !important}.pr-xl-2{padding-right:8px !important}.pb-xl-2{padding-bottom:8px !important}.pl-xl-2{padding-left:8px !important}.px-xl-2{padding-right:8px !important;padding-left:8px !important}.py-xl-2{padding-top:8px !important;padding-bottom:8px !important}}@media (min-width: 1280px){.p-xl-3{padding:16px !important}.pt-xl-3{padding-top:16px !important}.pr-xl-3{padding-right:16px !important}.pb-xl-3{padding-bottom:16px !important}.pl-xl-3{padding-left:16px !important}.px-xl-3{padding-right:16px !important;padding-left:16px !important}.py-xl-3{padding-top:16px !important;padding-bottom:16px !important}}@media (min-width: 1280px){.p-xl-4{padding:24px !important}.pt-xl-4{padding-top:24px !important}.pr-xl-4{padding-right:24px !important}.pb-xl-4{padding-bottom:24px !important}.pl-xl-4{padding-left:24px !important}.px-xl-4{padding-right:24px !important;padding-left:24px !important}.py-xl-4{padding-top:24px !important;padding-bottom:24px !important}}@media (min-width: 1280px){.p-xl-5{padding:32px !important}.pt-xl-5{padding-top:32px !important}.pr-xl-5{padding-right:32px !important}.pb-xl-5{padding-bottom:32px !important}.pl-xl-5{padding-left:32px !important}.px-xl-5{padding-right:32px !important;padding-left:32px !important}.py-xl-5{padding-top:32px !important;padding-bottom:32px !important}}@media (min-width: 1280px){.p-xl-6{padding:40px !important}.pt-xl-6{padding-top:40px !important}.pr-xl-6{padding-right:40px !important}.pb-xl-6{padding-bottom:40px !important}.pl-xl-6{padding-left:40px !important}.px-xl-6{padding-right:40px !important;padding-left:40px !important}.py-xl-6{padding-top:40px !important;padding-bottom:40px !important}}.p-responsive{padding-right:16px !important;padding-left:16px !important}@media (min-width: 544px){.p-responsive{padding-right:40px !important;padding-left:40px !important}}@media (min-width: 1012px){.p-responsive{padding-right:16px !important;padding-left:16px !important}}.h1{font-size:26px !important}@media (min-width: 768px){.h1{font-size:32px !important}}.h2{font-size:22px !important}@media (min-width: 768px){.h2{font-size:24px !important}}.h3{font-size:18px !important}@media (min-width: 768px){.h3{font-size:20px !important}}.h4{font-size:16px !important}.h5{font-size:14px !important}.h6{font-size:12px !important}.h1,.h2,.h3,.h4,.h5,.h6{font-weight:600 !important}.f1{font-size:26px !important}@media (min-width: 768px){.f1{font-size:32px !important}}.f2{font-size:22px !important}@media (min-width: 768px){.f2{font-size:24px !important}}.f3{font-size:18px !important}@media (min-width: 768px){.f3{font-size:20px !important}}.f4{font-size:16px !important}@media (min-width: 768px){.f4{font-size:16px !important}}.f5{font-size:14px !important}.f6{font-size:12px !important}.f00-light{font-size:40px !important;font-weight:300 !important}@media (min-width: 768px){.f00-light{font-size:48px !important}}.f0-light{font-size:32px !important;font-weight:300 !important}@media (min-width: 768px){.f0-light{font-size:40px !important}}.f1-light{font-size:26px !important;font-weight:300 !important}@media (min-width: 768px){.f1-light{font-size:32px !important}}.f2-light{font-size:22px !important;font-weight:300 !important}@media (min-width: 768px){.f2-light{font-size:24px !important}}.f3-light{font-size:18px !important;font-weight:300 !important}@media (min-width: 768px){.f3-light{font-size:20px !important}}.text-small{font-size:12px !important}.lead{margin-bottom:30px;font-size:20px;font-weight:300;color:#586069}.lh-condensed-ultra{line-height:1 !important}.lh-condensed{line-height:1.25 !important}.lh-default{line-height:1.5 !important}.text-right{text-align:right !important}.text-left{text-align:left !important}.text-center{text-align:center !important}@media (min-width: 544px){.text-sm-right{text-align:right !important}.text-sm-left{text-align:left !important}.text-sm-center{text-align:center !important}}@media (min-width: 768px){.text-md-right{text-align:right !important}.text-md-left{text-align:left !important}.text-md-center{text-align:center !important}}@media (min-width: 1012px){.text-lg-right{text-align:right !important}.text-lg-left{text-align:left !important}.text-lg-center{text-align:center !important}}@media (min-width: 1280px){.text-xl-right{text-align:right !important}.text-xl-left{text-align:left !important}.text-xl-center{text-align:center !important}}.text-normal{font-weight:400 !important}.text-bold{font-weight:600 !important}.text-italic{font-style:italic !important}.text-uppercase{text-transform:uppercase !important}.no-underline{text-decoration:none !important}.no-wrap{white-space:nowrap !important}.ws-normal{white-space:normal !important}.wb-break-all{word-break:break-all !important}.text-emphasized{font-weight:600;color:#24292e}.list-style-none{list-style:none !important}.text-shadow-dark{text-shadow:0 1px 1px rgba(27,31,35,0.25),0 1px 25px rgba(27,31,35,0.75)}.text-shadow-light{text-shadow:0 1px 0 rgba(255,255,255,0.5)}.v-hidden{visibility:hidden !important}.v-visible{visibility:visible !important}.d-table{display:table !important}.d-table-cell{display:table-cell !important}.table-fixed{table-layout:fixed !important}.d-block{display:block !important}.d-inline{display:inline !important}.d-inline-block{display:inline-block !important}.d-flex{display:flex !important}.d-inline-flex{display:inline-flex !important}.d-none{display:none !important}@media (min-width: 544px){.d-sm-table{display:table !important}.d-sm-table-cell{display:table-cell !important}.d-sm-block{display:block !important}.d-sm-inline{display:inline !important}.d-sm-inline-block{display:inline-block !important}.d-sm-flex{display:flex !important}.d-sm-inline-flex{display:inline-flex !important}.d-sm-none{display:none !important}}@media (min-width: 768px){.d-md-table{display:table !important}.d-md-table-cell{display:table-cell !important}.d-md-block{display:block !important}.d-md-inline{display:inline !important}.d-md-inline-block{display:inline-block !important}.d-md-flex{display:flex !important}.d-md-inline-flex{display:inline-flex !important}.d-md-none{display:none !important}}@media (min-width: 1012px){.d-lg-table{display:table !important}.d-lg-table-cell{display:table-cell !important}.d-lg-block{display:block !important}.d-lg-inline{display:inline !important}.d-lg-inline-block{display:inline-block !important}.d-lg-flex{display:flex !important}.d-lg-inline-flex{display:inline-flex !important}.d-lg-none{display:none !important}}@media (min-width: 1280px){.d-xl-table{display:table !important}.d-xl-table-cell{display:table-cell !important}.d-xl-block{display:block !important}.d-xl-inline{display:inline !important}.d-xl-inline-block{display:inline-block !important}.d-xl-flex{display:flex !important}.d-xl-inline-flex{display:inline-flex !important}.d-xl-none{display:none !important}}@media (max-width: 544px){.hide-sm{display:none !important}}@media (min-width: 544px) and (max-width: 768px){.hide-md{display:none !important}}@media (min-width: 768px) and (max-width: 1012px){.hide-lg{display:none !important}}@media (min-width: 1012px){.hide-xl{display:none !important}}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);word-wrap:normal;border:0}.show-on-focus{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}.show-on-focus:focus{z-index:20;width:auto;height:auto;clip:auto}.container{width:980px;margin-right:auto;margin-left:auto}.container::before{display:table;content:""}.container::after{display:table;clear:both;content:""}.container-md{max-width:768px;margin-right:auto;margin-left:auto}.container-lg{max-width:1012px;margin-right:auto;margin-left:auto}.container-xl{max-width:1280px;margin-right:auto;margin-left:auto}.columns{margin-right:-10px;margin-left:-10px}.columns::before{display:table;content:""}.columns::after{display:table;clear:both;content:""}.column{float:left;padding-right:10px;padding-left:10px}.one-third{width:33.333333%}.two-thirds{width:66.666667%}.one-fourth{width:25%}.one-half{width:50%}.three-fourths{width:75%}.one-fifth{width:20%}.four-fifths{width:80%}.centered{display:block;float:none;margin-right:auto;margin-left:auto}.col-1{width:8.3333333333%}.col-2{width:16.6666666667%}.col-3{width:25%}.col-4{width:33.3333333333%}.col-5{width:41.6666666667%}.col-6{width:50%}.col-7{width:58.3333333333%}.col-8{width:66.6666666667%}.col-9{width:75%}.col-10{width:83.3333333333%}.col-11{width:91.6666666667%}.col-12{width:100%}@media (min-width: 544px){.col-sm-1{width:8.3333333333%}.col-sm-2{width:16.6666666667%}.col-sm-3{width:25%}.col-sm-4{width:33.3333333333%}.col-sm-5{width:41.6666666667%}.col-sm-6{width:50%}.col-sm-7{width:58.3333333333%}.col-sm-8{width:66.6666666667%}.col-sm-9{width:75%}.col-sm-10{width:83.3333333333%}.col-sm-11{width:91.6666666667%}.col-sm-12{width:100%}}@media (min-width: 768px){.col-md-1{width:8.3333333333%}.col-md-2{width:16.6666666667%}.col-md-3{width:25%}.col-md-4{width:33.3333333333%}.col-md-5{width:41.6666666667%}.col-md-6{width:50%}.col-md-7{width:58.3333333333%}.col-md-8{width:66.6666666667%}.col-md-9{width:75%}.col-md-10{width:83.3333333333%}.col-md-11{width:91.6666666667%}.col-md-12{width:100%}}@media (min-width: 1012px){.col-lg-1{width:8.3333333333%}.col-lg-2{width:16.6666666667%}.col-lg-3{width:25%}.col-lg-4{width:33.3333333333%}.col-lg-5{width:41.6666666667%}.col-lg-6{width:50%}.col-lg-7{width:58.3333333333%}.col-lg-8{width:66.6666666667%}.col-lg-9{width:75%}.col-lg-10{width:83.3333333333%}.col-lg-11{width:91.6666666667%}.col-lg-12{width:100%}}@media (min-width: 1280px){.col-xl-1{width:8.3333333333%}.col-xl-2{width:16.6666666667%}.col-xl-3{width:25%}.col-xl-4{width:33.3333333333%}.col-xl-5{width:41.6666666667%}.col-xl-6{width:50%}.col-xl-7{width:58.3333333333%}.col-xl-8{width:66.6666666667%}.col-xl-9{width:75%}.col-xl-10{width:83.3333333333%}.col-xl-11{width:91.6666666667%}.col-xl-12{width:100%}}.gutter{margin-right:-16px;margin-left:-16px}.gutter>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-condensed{margin-right:-8px;margin-left:-8px}.gutter-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-spacious{margin-right:-24px;margin-left:-24px}.gutter-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}@media (min-width: 544px){.gutter-sm{margin-right:-16px;margin-left:-16px}.gutter-sm>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-sm-condensed{margin-right:-8px;margin-left:-8px}.gutter-sm-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-sm-spacious{margin-right:-24px;margin-left:-24px}.gutter-sm-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}}@media (min-width: 768px){.gutter-md{margin-right:-16px;margin-left:-16px}.gutter-md>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-md-condensed{margin-right:-8px;margin-left:-8px}.gutter-md-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-md-spacious{margin-right:-24px;margin-left:-24px}.gutter-md-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}}@media (min-width: 1012px){.gutter-lg{margin-right:-16px;margin-left:-16px}.gutter-lg>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-lg-condensed{margin-right:-8px;margin-left:-8px}.gutter-lg-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-lg-spacious{margin-right:-24px;margin-left:-24px}.gutter-lg-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}}@media (min-width: 1280px){.gutter-xl{margin-right:-16px;margin-left:-16px}.gutter-xl>[class*="col-"]{padding-right:16px !important;padding-left:16px !important}.gutter-xl-condensed{margin-right:-8px;margin-left:-8px}.gutter-xl-condensed>[class*="col-"]{padding-right:8px !important;padding-left:8px !important}.gutter-xl-spacious{margin-right:-24px;margin-left:-24px}.gutter-xl-spacious>[class*="col-"]{padding-right:24px !important;padding-left:24px !important}}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}@media (min-width: 544px){.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}}@media (min-width: 768px){.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}}@media (min-width: 1012px){.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}}@media (min-width: 1280px){.offset-xl-1{margin-left:8.3333333333%}.offset-xl-2{margin-left:16.6666666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.3333333333%}.offset-xl-5{margin-left:41.6666666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.3333333333%}.offset-xl-8{margin-left:66.6666666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.3333333333%}.offset-xl-11{margin-left:91.6666666667%}}.markdown-body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0 !important}.markdown-body>*:last-child{margin-bottom:0 !important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:#cb2431}.markdown-body .anchor{float:left;padding-right:4px;margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre{margin-top:0;margin-bottom:16px}.markdown-body hr{height:0.25em;padding:0;margin:24px 0;background-color:#e1e4e8;border:0}.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:0.25em solid #dfe2e5}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#444d56;vertical-align:middle;background-color:#fafbfc;border:solid 1px #c6cbd1;border-bottom-color:#959da5;border-radius:3px;box-shadow:inset 0 -1px 0 #959da5}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#1b1f23;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{font-size:inherit}.markdown-body h1{padding-bottom:0.3em;font-size:2em;border-bottom:1px solid #eaecef}.markdown-body h2{padding-bottom:0.3em;font-size:1.5em;border-bottom:1px solid #eaecef}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:0.875em}.markdown-body h6{font-size:0.85em;color:#6a737d}.markdown-body ul,.markdown-body ol{padding-left:2em}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:0.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body table{display:block;width:100%;overflow:auto}.markdown-body table th{font-weight:600}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid #dfe2e5}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body table img{background-color:transparent}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:transparent}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #dfe2e5}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#24292e}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:0;padding-top:0.2em;padding-bottom:0.2em;margin:0;font-size:85%;background-color:rgba(27,31,35,0.05);border-radius:3px}.markdown-body code::before,.markdown-body code::after,.markdown-body tt::before,.markdown-body tt::after{letter-spacing:-0.2em;content:"\00a0"}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:transparent;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code::before,.markdown-body pre code::after,.markdown-body pre tt::before,.markdown-body pre tt::after{content:normal}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px 8px 9px;text-align:right;background:#fff;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:600;background:#f6f8fa;border-top:0}.highlight table td{padding:5px}.highlight table pre{margin:0}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .c,.highlight .cd{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .ge{color:#000000;font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{color:#000000;font-weight:bold}.highlight .kd{color:#000000;font-weight:bold}.highlight .kn{color:#000000;font-weight:bold}.highlight .kp{color:#000000;font-weight:bold}.highlight .kr{color:#000000;font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .k,.highlight .kv{color:#000000;font-weight:bold}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .il{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .m,.highlight .mb,.highlight .mx{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .bp{color:#999999}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .nd{color:#3c5d5d;font-weight:bold}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nl{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .nv{color:#008080}.highlight .ow{color:#000000;font-weight:bold}.highlight .o{color:#000000;font-weight:bold}.highlight .w{color:#bbbbbb}.highlight{background-color:#f8f8f8}
	</style>
  </head>
  <body>
    <div class="container-lg px-3 my-5 markdown-body">

      <p><strong>Document number:</strong> P0800R0</p>

<p><strong>Date:</strong> 2017-08-28</p>

<p><strong>Audience:</strong> Evolution Working Group</p>

<p><strong>Reply-to:</strong> Christopher Di Bella <a href="mailto:christopher@codeplay.com">christopher@codeplay.com</a></p>

<h1 id="the-concepts-ts-improves-upon-c">The Concepts TS improves upon C++</h1>

<h2 id="abstract">Abstract<a class="anchorjs-link " href="#abstract" aria-label="Anchor link for: abstract" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<p>There is concern that the Concepts TS does not improve C++, and that it might not be necessary.
This paper addresses some concerns, and considers why having and using (but not necessarily writing)
concepts is beneficial to the average C++ programmer.</p>

<h2 id="contents">Contents<a class="anchorjs-link " href="#contents" aria-label="Anchor link for: contents" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<ol>
  <li><a href="#introduction">Introduction</a></li>
  <li><a href="#definitions">Definitions</a></li>
  <li><a href="#error-messages-with-concepts-and-ranges">Error messages with Concepts and Ranges</a></li>
  <li><a href="#generic-programming-with-concepts">Generic programming with Concepts</a></li>
  <li><a href="#generic-programming-in-c17">Generic programming in C++17</a></li>
  <li><a href="#conclusion">Conclusion</a></li>
  <li><a href="#acknowledgements">Acknowledgements</a></li>
  <li><a href="#references">References</a></li>
  <li><a href="#appendix-a">Appendix A</a></li>
</ol>

<h2 id="introduction">Introduction<a class="anchorjs-link " href="#introduction" aria-label="Anchor link for: introduction" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<p>This paper addresses some of the concerns that some programmers have about whether the Concepts TS
contributes to the C++ programming language.</p>

<h3 id="definitions">Definitions<a class="anchorjs-link " href="#definitions" aria-label="Anchor link for: definitions" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<ul>
  <li><strong>Modern C++</strong> refers to any C++ Standard published since 2011.</li>
  <li><strong>Concepts TS</strong> is shorthand for <em>ISO/IEC TS 19217:2015, Programming Languages
– C++ Extensions for Concepts</em>.</li>
  <li><strong>Concepts</strong> is shorthand for the Concepts TS</li>
  <li><strong>concept</strong> refers to an individual <code class="highlighter-rouge">concept</code> written in code</li>
  <li><strong>Ranges TS</strong> is shorthand for <em>N4685, Working Draft, C++ Extensions for Ranges</em>.</li>
  <li><strong>Ranges</strong> is shorthand for the Ranges TS.</li>
  <li><strong>Novice C++ programmer</strong> (or some variant) refers to a C++ programmer with less than three years
experience with modern C++.</li>
  <li><strong>Average C++ programmer</strong> (or some variant) refers to a C++ programmer with three or more years
experience with modern C++.</li>
  <li><strong>Expert C++ programmer</strong> (or some variant) refers to a C++ programmer that satisfies at least one
of the following criteria:
    <ol>
      <li>attends WG21-related meetings (e.g. this meeting)</li>
      <li>attends WG21-related calls (e.g. SG14 telecons)</li>
      <li>contributes to Standard proposal papers</li>
      <li>contributes to a modern C++ compiler (e.g. GCC)</li>
      <li>contributes to a modern C++ Standard Library (e.g. libc++)</li>
      <li>contributes to a modern C++ library similar to the Standard Library (e.g. Boost, range-v3, etc.)</li>
      <li>contributes to a reference implementation for a Standard proposal or Technical Specification
(e.g. cmcstl2)</li>
      <li>has ten or more years experience with C++, particularly with templates, including template
metaprogramming (includes using Boost.MPL)</li>
    </ol>
  </li>
  <li><strong>Clang</strong> or <strong>LLVM</strong> refer to the C++ implementation of LLVM 5.
    <ul>
      <li><strong>libc++</strong> refers to the LLVM implementation of the C++ Standard Library,
provided by the flag <code class="highlighter-rouge">-stdlib=libc++</code> to Clang.</li>
    </ul>
  </li>
  <li><strong>GCC</strong> refers to the C++ implementation of GCC 7.
    <ul>
      <li><strong>libstdc++</strong> refers to the GCC implementation of the C++ Standard Library.</li>
    </ul>
  </li>
  <li><strong>MSVC</strong> refers to the C++ implementation of Microsoft Visual C++ 2017.</li>
</ul>

<p>All compiler diagnostics are provided through Matt Godbolt’s <em>Compiler Explorer</em>, and are also
present in Appendix A for offline viewing. Following the links to Compiler Explorer is advised.</p>

<h2 id="error-messages-with-concepts-and-ranges">Error messages with Concepts and Ranges<a class="anchorjs-link " href="#error-messages-with-concepts-and-ranges" aria-label="Anchor link for: error messages with concepts and ranges" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<p>One particular concern is that Concepts do not improve compiler diagnostics. To illustrate, we’ll
consider the following two programs:</p>

<ul>
  <li>Listing 1. <a href="https://godbolt.org/g/S2v4Bh">Without concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;algorithm&gt;
#include &lt;iterator&gt;
#include &lt;list&gt;
</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="k">auto</span> <span class="n">l</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">list</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">};</span>
  <span class="n">std</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">begin</span><span class="p">(</span><span class="n">l</span><span class="p">),</span> <span class="n">std</span><span class="o">::</span><span class="n">end</span><span class="p">(</span><span class="n">l</span><span class="p">));</span>
<span class="p">}</span>
</code></pre>
</div>

<ul>
  <li>Listing 2. <a href="https://godbolt.org/g/wqgvdH">With concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;list&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="k">auto</span> <span class="n">l</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">list</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">};</span>
  <span class="n">ranges</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">ranges</span><span class="o">::</span><span class="n">begin</span><span class="p">(</span><span class="n">l</span><span class="p">),</span> <span class="n">ranges</span><span class="o">::</span><span class="n">end</span><span class="p">(</span><span class="n">l</span><span class="p">));</span>
<span class="p">}</span>
</code></pre>
</div>

<p>Both diagnostics – on their own and at a first glance – appear to be expert-friendly. Both are
incredibly verbose, which can be indimidating, and the <code class="highlighter-rouge">ranges::sort</code> is sufficiently more verbose.
This does not mean that it is sufficiently more expert-friendly than <code class="highlighter-rouge">std::sort</code>: instead, it opens
opportunities for tools to provide more <em>informative</em> diagnostics. At present, this might be using a
third-party tool that only reveals certain text from the diagnostic (e.g. showing only the parts
that match the regular expression “concept bool\W+\w+\W*=”); in future, it might be possible for a
compiler to implement a feature that cleans up the diagnostics further.</p>

<p>It’s not possible to do this solely with template diagnostics because the template does not contain
the necessary information. The information that is spewed from <code class="highlighter-rouge">std::sort</code> rambles on about an
<code class="highlighter-rouge">operator-</code> that the user has not implemented. The only piece of information that is actually
informative is <code class="highlighter-rouge">_RandomAccessIterator</code>, but this isn’t easily findable when using libc++, and there
is no mention of the word ‘random’ in the diagnostic from MSVC 2017 at all. Since all three major
compilers discuss <code class="highlighter-rouge">operator-</code>, and only two of them mention ‘random’ (almost in passing), the
following information can be inferred from the diagnostic:</p>

<ol>
  <li>It has something to do with <code class="highlighter-rouge">std::sort</code> (given that libstdc++ talks about <code class="highlighter-rouge">std::__sort</code>, libc++
talks about <code class="highlighter-rouge">std::__1::__insertion_sort</code>, and MSVC talks about both <code class="highlighter-rouge">std::sort</code> and
<code class="highlighter-rouge">std::_Sort_unchecked</code>).</li>
  <li>It has something to do with <code class="highlighter-rouge">operator-</code></li>
</ol>

<p>In contrast, <code class="highlighter-rouge">ranges::sort</code> spews diagnostics regarding the interface for <code class="highlighter-rouge">sort</code>. There is rambling,
but it explicitly mentions a few key words:</p>

<ol>
  <li><code class="highlighter-rouge">std::experimental::ranges::v1::sort</code></li>
  <li><code class="highlighter-rouge">concept bool RandomAccessIterator</code></li>
  <li><code class="highlighter-rouge">concept bool DerivedFrom</code></li>
  <li><code class="highlighter-rouge">concept bool SizedSentinel</code></li>
  <li><code class="highlighter-rouge">concept bool StrictTotallyOrdered</code></li>
  <li><code class="highlighter-rouge">concept bool __totally_ordered</code></li>
  <li><code class="highlighter-rouge">concept bool RandomAccessIncrementable</code></li>
  <li><code class="highlighter-rouge">concept bool RandomAccessIterator</code></li>
  <li><code class="highlighter-rouge">RandomAccessRange and Sortable</code></li>
</ol>

<p>Even most of this is noise, but we get a lot more information. Firstly, there’s no mention of
<code class="highlighter-rouge">operator-</code>, which is an <em>implementation detail</em> of the sort algorithm. This means that we are left
to consider how we interact with our algorithm. The diagnostic provided by the concept also mentions
the term <code class="highlighter-rouge">RandomAccess</code> four times: this means that we’re likely violating some contract that asks
for a random access data structure: this is a topic that is covered in the first year of computer
science at university, or when <code class="highlighter-rouge">std::list</code> is introduced in a well-written resource (there’s no need
to discuss random access and linear access until a non-<code class="highlighter-rouge">vector</code> container appears).</p>

<p>As previously stated, the diagnostics can be improved upon here: what we currently have is a
prototype.</p>

<p>The quality of diagnostics is a strong motivator for using concepts, but it’s not the only reason to
use them. There’s more on that below. If the use of concepts served solely as a vehicle to improve
diagnostics, the compiler might not be the tool to grok the diagnostics: we use other tools, such as
IDEs, lint tools, and static analysers. Perhaps one of these can pick up when a compiler struggles
to provide ample documentation. Recall that the Standard does not specify <em>how</em> diagnostics are to
be output – only that they are – and users who prefer not to use tools can request better
diagnostics from their compiler vendor.</p>

<hr>

<p>Let’s now consider sorting on a type that can’t be compared.</p>

<ul>
  <li>Listing 3. <a href="https://godbolt.org/g/5h3NqK">Without concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;algorithm&gt;
#include &lt;iterator&gt;
#include &lt;vector&gt;
</span>
<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{};</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="k">auto</span> <span class="n">l</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span><span class="p">{};</span>
  <span class="n">std</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">begin</span><span class="p">(</span><span class="n">l</span><span class="p">),</span> <span class="n">std</span><span class="o">::</span><span class="n">end</span><span class="p">(</span><span class="n">l</span><span class="p">));</span>
<span class="p">}</span>
</code></pre>
</div>

<ul>
  <li>Listing 4. <a href="https://godbolt.org/g/BQruYa">With concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;vector&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>

<span class="k">class</span> <span class="nc">Non_sortable</span> <span class="p">{};</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="k">auto</span> <span class="n">l</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">Non_sortable</span><span class="o">&gt;</span><span class="p">{};</span>
  <span class="n">ranges</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">ranges</span><span class="o">::</span><span class="n">begin</span><span class="p">(</span><span class="n">l</span><span class="p">),</span> <span class="n">ranges</span><span class="o">::</span><span class="n">end</span><span class="p">(</span><span class="n">l</span><span class="p">));</span>
<span class="p">}</span>
</code></pre>
</div>

<p>Toward the top of both libstdc++ and libc++, we can see that an expression of the form <code class="highlighter-rouge">a &lt; b</code> is
invalid. MSVC also mentions <code class="highlighter-rouge">std::less&lt;void&gt;</code>, so we can safely conclude that all three major
implementations of the Standard Library communicate we’re falling flat on our faces with a less-than
comparison. Beyond that, there isn’t terribly much useful information, and it isn’t clear from the
way that it is presented that a lacking <code class="highlighter-rouge">bool operator&lt;(const Foo&amp;, const Foo&amp;)</code> is the culprit:</p>

<ol>
  <li>GCC talks a lot about <code class="highlighter-rouge"><span class="p">{</span><span class="w"> </span><span class="err">return</span><span class="w"> </span><span class="err">*__it1</span><span class="w"> </span><span class="err">&lt;</span><span class="w"> </span><span class="err">*__it2;</span><span class="w"> </span><span class="p">}</span></code>. This snippet of code exposes the
implementation of <code class="highlighter-rouge">std::sort</code> to users. Users shouldn’t be concerned with a correct
implementation of <code class="highlighter-rouge">std::sort</code>; they should be focusing on the contract that they’ve ignored.</li>
  <li>LLVM is exempt, its diagnostic is rather clear.</li>
  <li>MSVC’s diagnostics are less clear, but with some squinting, we can see that they are related to
<code class="highlighter-rouge">Foo</code>.</li>
</ol>

<p>The Ranges TS provides vastly different output. The most relevant part of the diagnostic is</p>

<div class="highlighter-rouge"><pre class="highlight"><code>  concept bool Sortable =
  concept bool IndirectStrictWeakOrder =
  concept bool StrictWeakOrder =
  concept bool Relation =
  concept bool StrictWeakOrder =
  concept bool Relation =
  concept bool StrictWeakOrder =
  concept bool Relation =
  concept bool StrictWeakOrder =
  concept bool Relation =
  concept bool StrictWeakOrder =
  concept bool Relation =
</code></pre>
</div>

<p>To understand what is happening here, we need to understand what it means to be <code class="highlighter-rouge">Sortable</code>, what a
<code class="highlighter-rouge">StrictWeakOrder</code> is, and what a <code class="highlighter-rouge">Relation</code> is. We can look to mathematics for the definition of
both a relation[3][4] and a strict weak order[5][6]. (We discuss <code class="highlighter-rouge">Sortable</code> in detail later).
<code class="highlighter-rouge">StrictWeakOrder</code> is also known as the
<a href="http://en.cppreference.com/w/cpp/concept/Compare"><code class="highlighter-rouge">Compare</code> concept</a> in the C++ Standard Library.</p>

<p>While it requires programmers to know more terms, these terms remain consistent with the C++
Standard, as opposed to the diagnostics returned from something such as <code class="highlighter-rouge">std::sort</code>, which may vary
from implementation to implementation.</p>

<h2 id="generic-programming-with-concepts">Generic programming with Concepts<a class="anchorjs-link " href="#generic-programming-with-concepts" aria-label="Anchor link for: generic programming with concepts" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<p>It has been argued that real-world concepts, such as <code class="highlighter-rouge">Sortable</code>, are difficult to understand. This
is correct. I do not expect the authors of the Palo Alto TR, nor the authors of the Ranges TS to
disagree either. The mathematics involved is complex and took years to correctly derive (the Palo
Alto TR was published in 2012; the Ranges TS in 2017). The algebra required to employ Standard
algorithms is present regardless of them using concepts – wildly incorrect code will still violate
the contract, and well-specified concepts can help to <em>enforce</em> said contract.</p>

<p>What the Ranges TS does is provide a <em>formal</em> way for compilers (and other tools) to check if a type
can be sorted, and <em>clearly</em> communicate the requirements of an interface to users. Someone needs to
write <code class="highlighter-rouge">Sortable</code> – in fact, it took at least two people to define this, possibly more – which
means that it’s not a trivial requirement to properly pin down. Leaving this in the hands of the
average programmer is not advisable.</p>

<p>Concepts should not be <em>written</em> by average programmers: they only need to <em>use</em> concepts to reap
the benefits of such complex code. A textbook or reference might summarise <code class="highlighter-rouge">Sortable</code> as</p>

<blockquote>
  <p>An iterator is <code class="highlighter-rouge">Sortable</code> if, and only if, it is mutable and its <code class="highlighter-rouge">value_type</code> is both <code class="highlighter-rouge">Movable</code>
and has a strict weak ordering imposed on it.</p>
</blockquote>

<p>The terms “mutable”, <code class="highlighter-rouge">Movable</code>, and “strict weak ordering” are all fairly simple to communicate, and
would ideally be introduced well before the definition of the term <code class="highlighter-rouge">Sortable</code> in a well-designed
course or textbook.</p>

<hr>

<p>One might wonder if concepts are simple to compose for experts. Again, they are not, and should
not be trivially composable. A descriptive concept isn’t written for trivial things such as
<code class="highlighter-rouge">Addable</code>, <code class="highlighter-rouge">Subtractable</code>, etc.: <code class="highlighter-rouge">Sortable</code> aims to mathematically capture the definition of a
sortable type. Spending five years on modelling the requirements for the Standard Library implicitly
suggests that concepts <em>should not</em> be an easy pass.</p>

<p>This demonstrates that even experts shouldn’t be writing concepts on their own. They can use them,
knowing that once they’ve been thoroughly vetted, the code is guaranteed to block things that
shouldn’t be used as parameters.</p>

<h2 id="generic-programming-in-c17">Generic programming in C++17<a class="anchorjs-link " href="#generic-programming-in-c17" aria-label="Anchor link for: generic programming in c17" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<p>Modern C++ offers various tools for expressive generic programming, and some people wonder if these
make concepts redundant. We’ll consider them in turn.</p>

<ol>
  <li><code class="highlighter-rouge">std::enable_if</code></li>
  <li>Tag dispatching</li>
  <li><code class="highlighter-rouge">constexpr</code>-<code class="highlighter-rouge">if</code> statements</li>
  <li><code class="highlighter-rouge">constexpr bool</code></li>
</ol>

<h3 id="stdenable_if"><code class="highlighter-rouge">std::enable_if</code><a class="anchorjs-link " href="#stdenable_if" aria-label="Anchor link for: stdenable_if" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<p><code class="highlighter-rouge">enable_if</code> is a hacky way to implement concepts at best. <code class="highlighter-rouge">enable_if&lt;Condition, T&gt;</code> will have a
member alias called <code class="highlighter-rouge">type</code> if, and only if, <code class="highlighter-rouge">Condition</code> evaluates to <code class="highlighter-rouge">true</code>. This provides a way to
leverage SFINAE to conditionally disable template specialisations and overloads. However,
diagnostics will range from <a href="https://godbolt.org/g/HVVBwK">overload resolution failures</a> to
<a href="https://godbolt.org/g/HLyGWy">incomplete type errors</a> none of which provide information of <em>why</em>
there was a failure.</p>

<p>Concepts, on the other hand, offer a robust mechanism for detecting which requirement isn’t
satisfied. This is likely due to the fact that it is a first-class, core language feature. Another
bonus is that it explicitly communicates that a constraint hasn’t been satisfied – something that
is not made clear by our <code class="highlighter-rouge">enable_if</code> hack!</p>

<p>This can be demonstrated by taking a look at the diagnostics from the following examples.</p>

<h4 id="not-equalitycomparable">Not <code class="highlighter-rouge">EqualityComparable</code><a class="anchorjs-link " href="#not-equalitycomparable" aria-label="Anchor link for: not equalitycomparable" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<ul>
  <li>Listing 5. <a href="https://godbolt.org/g/BDxLaT">Without concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;regex&gt;
#include &lt;type_traits&gt;
</span>
<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Destructible</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_destructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">DefaultConstructible</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_default_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Movable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Copyable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Semiregular</span> <span class="o">=</span> <span class="n">Copyable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">DefaultConstructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">EqualityComparable</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">==</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span>
   <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">!=</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Regular</span> <span class="o">=</span> <span class="n">Semiregular</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">EqualityComparable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">std</span><span class="o">::</span><span class="n">enable_if_t</span><span class="o">&lt;</span><span class="n">Regular</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">regex</span><span class="o">&gt;</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">regex</span><span class="o">&gt;</span> <span class="n">foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<ul>
  <li>Listing 6. <a href="https://godbolt.org/g/WEUwLa">With concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;regex&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>
<span class="k">using</span> <span class="n">ranges</span><span class="o">::</span><span class="n">Regular</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">Regular</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">regex</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<p>While it’s is possible to work out that <code class="highlighter-rouge">std::regex</code> isn’t <code class="highlighter-rouge">EqualityComparable</code> when using GCC
(without concepts), it isn’t nearly as clear as the concept-equivalent GCC implementation. There are
considerable more diagnostics to decipher, and GCC sells the idea that the problem lies with the
definition of <code class="highlighter-rouge">EqualityComparable</code>, instead of directing the programmer to understand that
<code class="highlighter-rouge">std::regex</code> fails to meet the requirements of <code class="highlighter-rouge">Regular</code>, because it fails to meet the requirements
outlined by <code class="highlighter-rouge">EqualityComparable</code>.</p>

<p>MSVC identifies that <code class="highlighter-rouge">std::regex</code> doesn’t have an <code class="highlighter-rouge">operator==</code>, nor an <code class="highlighter-rouge">operator!=</code>, but it also
spits out a lot of spurious and irrelevant diagnostics.</p>

<p>Clang offers the best non-concept-diagnostics. It also sells the idea that there is a problem with
<code class="highlighter-rouge">EqualityComparable</code>, but words it in such a way that with experience, one can be able to discern
what is happening. The biggest issue is that it reports the error in reverse – something that
Concepts fixes.</p>

<h4 id="not-defaultconstructible">Not <code class="highlighter-rouge">DefaultConstructible</code><a class="anchorjs-link " href="#not-defaultconstructible" aria-label="Anchor link for: not defaultconstructible" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<ul>
  <li>Listing 7. <a href="https://godbolt.org/g/LFa394">Without concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;regex&gt;
#include &lt;type_traits&gt;
</span>
<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="n">Foo</span><span class="p">()</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span> 
<span class="p">};</span>

<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">==</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">!=</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Destructible</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_destructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">DefaultConstructible</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_default_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Movable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Copyable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Semiregular</span> <span class="o">=</span> <span class="n">Copyable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">DefaultConstructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">EqualityComparable</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">==</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span>
   <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">!=</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Regular</span> <span class="o">=</span> <span class="n">Semiregular</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">EqualityComparable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">std</span><span class="o">::</span><span class="n">enable_if_t</span><span class="o">&lt;</span><span class="n">Regular</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span><span class="p">,</span> <span class="n">Foo</span><span class="o">&gt;</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<ul>
  <li>Listing 8. <a href="https://godbolt.org/g/Vo7Ati">With concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;regex&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>
<span class="k">using</span> <span class="n">ranges</span><span class="o">::</span><span class="n">Regular</span><span class="p">;</span>

<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="n">Foo</span><span class="p">()</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span> 
<span class="p">};</span>

<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">==</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">!=</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">Regular</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<p>This is a fairly open-shut case. None of the Concepts-absent compilers report that <code class="highlighter-rouge">Foo</code> is not a
<code class="highlighter-rouge">Regular</code> type because it is not <code class="highlighter-rouge">DefaultConstructible</code>. The Concepts-enabled GCC implementation
does.</p>

<h4 id="not-defaultconstructible-and-not-copyable">Not <code class="highlighter-rouge">DefaultConstructible</code> and not <code class="highlighter-rouge">Copyable</code><a class="anchorjs-link " href="#not-defaultconstructible-and-not-copyable" aria-label="Anchor link for: not defaultconstructible and not copyable" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<ul>
  <li>Listing 9. <a href="https://godbolt.org/g/w755Nh">Without concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;regex&gt;
#include &lt;type_traits&gt;
</span>
<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="n">Foo</span><span class="p">()</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span>
  <span class="n">Foo</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span>
<span class="p">};</span>

<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">==</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">!=</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Destructible</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_destructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">DefaultConstructible</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_default_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Movable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Copyable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Semiregular</span> <span class="o">=</span> <span class="n">Copyable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">DefaultConstructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">EqualityComparable</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">==</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span>
   <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">!=</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Regular</span> <span class="o">=</span> <span class="n">Semiregular</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">EqualityComparable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">std</span><span class="o">::</span><span class="n">enable_if_t</span><span class="o">&lt;</span><span class="n">Regular</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span><span class="p">,</span> <span class="n">Foo</span><span class="o">&gt;</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<ul>
  <li>Listing 10. <a href="https://godbolt.org/g/17V9A1">With concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;regex&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>
<span class="k">using</span> <span class="n">ranges</span><span class="o">::</span><span class="n">Regular</span><span class="p">;</span>

<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="n">Foo</span><span class="p">()</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span>
  <span class="n">Foo</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span>
<span class="p">};</span>

<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">==</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">!=</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">Regular</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<p>Again, non-Concepts compilers don’t identify why the code is ill-formed. There are a lot of
diagnostics from the Concepts-enabled GCC – perhaps this can be worked on, but at least it
identifies the problem.</p>

<h3 id="tag-dispatching">Tag dispatching<a class="anchorjs-link " href="#tag-dispatching" aria-label="Anchor link for: tag dispatching" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<ul>
  <li>Listing 11. <a href="https://godbolt.org/g/HhzSrc">Without concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;iterator&gt;
</span>
<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance_helper</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="k">typename</span> <span class="n">std</span><span class="o">::</span><span class="n">iterator_traits</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;::</span><span class="n">difference_type</span> <span class="n">n</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">random_access_iterator_tag</span><span class="p">)</span>
<span class="p">{</span>
   <span class="n">i</span> <span class="o">+=</span> <span class="n">n</span><span class="p">;</span>
<span class="p">}</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance_helper</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="k">typename</span> <span class="n">std</span><span class="o">::</span><span class="n">iterator_traits</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;::</span><span class="n">difference_type</span> <span class="n">n</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">bidirectional_iterator_tag</span><span class="p">)</span>
<span class="p">{</span>
   <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">--</span><span class="n">n</span><span class="p">)</span>
      <span class="o">++</span><span class="n">i</span><span class="p">;</span>
   <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">++</span><span class="n">n</span><span class="p">)</span>
      <span class="o">--</span><span class="n">i</span><span class="p">;</span>
<span class="p">}</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance_helper</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="k">typename</span> <span class="n">std</span><span class="o">::</span><span class="n">iterator_traits</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;::</span><span class="n">difference_type</span> <span class="n">n</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">input_iterator_tag</span><span class="p">)</span>
<span class="p">{</span>
   <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">--</span><span class="n">n</span><span class="p">)</span>
      <span class="o">++</span><span class="n">i</span><span class="p">;</span>
<span class="p">}</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="k">typename</span> <span class="n">std</span><span class="o">::</span><span class="n">iterator_traits</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;::</span><span class="n">difference_type</span> <span class="n">n</span><span class="p">)</span>
<span class="p">{</span>
   <span class="n">advance_helper</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="k">typename</span> <span class="n">std</span><span class="o">::</span><span class="n">iterator_traits</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;::</span><span class="n">iterator_category</span><span class="p">{});</span>
<span class="p">}</span>
</code></pre>
</div>

<ul>
  <li>Listing 12. <a href="https://godbolt.org/g/rdxueA">With concepts</a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/iterator&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="n">ranges</span><span class="o">::</span><span class="n">RandomAccessIterator</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance_helper</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="n">ranges</span><span class="o">::</span><span class="n">difference_type_t</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">n</span><span class="p">)</span>
<span class="p">{</span>
   <span class="n">i</span> <span class="o">+=</span> <span class="n">n</span><span class="p">;</span>
<span class="p">}</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="n">ranges</span><span class="o">::</span><span class="n">BidirectionalIterator</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance_helper</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="n">ranges</span><span class="o">::</span><span class="n">difference_type_t</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">n</span><span class="p">)</span>
<span class="p">{</span>
   <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">--</span><span class="n">n</span><span class="p">)</span>
      <span class="o">++</span><span class="n">i</span><span class="p">;</span>
   <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">++</span><span class="n">n</span><span class="p">)</span>
      <span class="o">--</span><span class="n">i</span><span class="p">;</span>
<span class="p">}</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="n">ranges</span><span class="o">::</span><span class="n">InputIterator</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance_helper</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="n">ranges</span><span class="o">::</span><span class="n">difference_type_t</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">n</span><span class="p">)</span>
<span class="p">{</span>
   <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">--</span><span class="n">n</span><span class="p">)</span>
      <span class="o">++</span><span class="n">i</span><span class="p">;</span>
<span class="p">}</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="n">ranges</span><span class="o">::</span><span class="n">difference_type_t</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">n</span><span class="p">)</span>
<span class="p">{</span>
   <span class="n">advance_helper</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">n</span><span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>

<p>Listing 11 is a slightly modified version of this example implementation[7] of <code class="highlighter-rouge">std::advance</code> to
illustrate type traits. This isn’t exactly complex code, but it is clunky, and it’s possible to
trick the compiler into thinking that we have a tag that we don’t really have. It is also very
awkward to call this function: we need to define an object that doesn’t really serve any purpose
other than to tell the compiler “call this function”.</p>

<p>Listing 12 eliminates all of these problems. It clearly states what the requirements are in the
template header and makes it considerably harder to trick the compiler. Furthermore, we don’t need
to have a tag to say “call me!”. This makes <em>using</em> constrained functions simpler than their
tag-counterparts.</p>

<h3 id="constexpr-if-statements"><code class="highlighter-rouge">constexpr</code>-<code class="highlighter-rouge">if</code> statements<a class="anchorjs-link " href="#constexpr-if-statements" aria-label="Anchor link for: constexpr if statements" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<ul>
  <li>Listing 13. <a href="https://godbolt.org/g/dBCJtT">Replacing concepts with <code class="highlighter-rouge">constexpr if</code></a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/iterator&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">I</span><span class="o">&gt;</span>
<span class="kt">void</span> <span class="n">advance</span><span class="p">(</span><span class="n">I</span> <span class="n">i</span><span class="p">,</span> <span class="n">ranges</span><span class="o">::</span><span class="n">difference_type_t</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span> <span class="n">n</span><span class="p">)</span>
<span class="p">{</span>
   <span class="k">if</span> <span class="k">constexpr</span> <span class="p">(</span><span class="n">ranges</span><span class="o">::</span><span class="n">RandomAccessIterator</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">)</span> <span class="p">{</span>
      <span class="n">i</span> <span class="o">+=</span> <span class="n">n</span><span class="p">;</span>
   <span class="p">}</span>
   <span class="k">else</span> <span class="k">if</span> <span class="k">constexpr</span> <span class="p">(</span><span class="n">ranges</span><span class="o">::</span><span class="n">BidirectionalIterator</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">--</span><span class="n">n</span><span class="p">)</span>
       <span class="o">++</span><span class="n">i</span><span class="p">;</span>
    <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">++</span><span class="n">n</span><span class="p">)</span>
       <span class="o">--</span><span class="n">i</span><span class="p">;</span>
   <span class="p">}</span>
   <span class="k">else</span> <span class="p">{</span>
      <span class="k">for</span> <span class="p">(;</span> <span class="n">n</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">;</span> <span class="o">--</span><span class="n">n</span><span class="p">)</span>
         <span class="o">++</span><span class="n">i</span><span class="p">;</span>
   <span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>

<ul>
  <li>Listing 14. <a href="https://godbolt.org/g/9B4NTz">Appropriate use of <code class="highlighter-rouge">constexpr if</code></a></li>
</ul>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/concepts&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;
#include &lt;deque&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span><span class="p">...</span><span class="o">&gt;</span> <span class="k">typename</span> <span class="n">C</span><span class="p">,</span> <span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="n">C</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="n">from_file</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">path</span><span class="p">)</span>
<span class="p">{</span>
   <span class="k">if</span> <span class="p">(</span><span class="k">auto</span> <span class="n">in</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">ifstream</span><span class="p">{</span><span class="n">path</span><span class="p">})</span> <span class="p">{</span>
      <span class="k">const</span> <span class="n">ranges</span><span class="o">::</span><span class="n">SignedIntegral</span> <span class="n">size</span> <span class="o">=</span> <span class="p">[</span><span class="o">&amp;</span><span class="n">in</span><span class="p">]{</span>
         <span class="n">ranges</span><span class="o">::</span><span class="n">SignedIntegral</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
         <span class="n">in</span> <span class="o">&gt;&gt;</span> <span class="n">i</span><span class="p">;</span>
         <span class="k">return</span> <span class="n">i</span><span class="p">;</span>
      <span class="p">}();</span>

      <span class="k">auto</span> <span class="n">c</span> <span class="o">=</span> <span class="p">[</span><span class="n">size</span><span class="p">]{</span>
         <span class="k">auto</span> <span class="n">c</span> <span class="o">=</span> <span class="n">C</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">{};</span>
         <span class="k">if</span> <span class="k">constexpr</span> <span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;&gt;</span><span class="p">)</span>
            <span class="n">c</span><span class="p">.</span><span class="n">reserve</span><span class="p">(</span><span class="n">size</span><span class="p">);</span>
         <span class="k">return</span> <span class="n">c</span><span class="p">;</span>
      <span class="p">}();</span>
      <span class="c1">// ...
</span>
      <span class="k">return</span> <span class="n">c</span><span class="p">;</span>
   <span class="p">}</span>
<span class="p">}</span>

<span class="kt">int</span> <span class="n">main</span><span class="p">()</span>
<span class="p">{</span>
    <span class="n">from_file</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="p">,</span> <span class="kt">int</span><span class="o">&gt;</span><span class="p">(</span><span class="s">"foo"</span><span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>

<p><code class="highlighter-rouge">constexpr</code>-<code class="highlighter-rouge">if</code> statements are a great way to eliminate SFINAE, as are Concepts. One might argue
that the above program could also be written as it is in Listing 13. This is terrible design. We
have combined three different functions, which articulate three different forms of logic, into a
single function that operates on <code class="highlighter-rouge">if</code>-statements.</p>

<p><code class="highlighter-rouge">constexpr if</code>-statements are a powerful tool, that when used correctly, are a great way for
avoiding nasty and obscure SFINAE. This is great in small doses, but it isn’t viable for something
where lots of specialised logic is present, or the logic for a specialisation is independent to
another specialisation.</p>

<p>An example of what constitutes as a ‘valid’ use of <code class="highlighter-rouge">constexpr if</code> might look like Listing 14.</p>

<p>The point of this contrived example is to show that <code class="highlighter-rouge">if constexpr</code> is used to complement the
function: not to completely switch behaviour on a different type, as is demonstrated in the
<code class="highlighter-rouge">advance</code> port.</p>

<p>This is an example of separating interfaces from implementations. Listing 13 confuses the boundary
between the interface and the implementation that is very clearly provided in Lisiting 12. Listing
14 does no such thing – enables one features that are very specific to <code class="highlighter-rouge">std::vector</code>, but it in no
way alters the bulk of the algorithm if we choose to use <code class="highlighter-rouge">std::deque</code> instead.</p>

<h3 id="constexpr-bool-objects"><code class="highlighter-rouge">constexpr bool</code> objects<a class="anchorjs-link " href="#constexpr-bool-objects" aria-label="Anchor link for: constexpr bool objects" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<p>Some might argue that the constrained variable declaration syntax can already be achieved by
templated <code class="highlighter-rouge">constexpr bool</code> objects. For an example, simply visit any of the links to Compiler
Explorer for a non-Concepts-enabled example.</p>

<p>When using them with <code class="highlighter-rouge">enable_if</code>, they choke out the ability to use automatic type deduction:
perhaps we should write code like so:</p>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="k">auto</span> <span class="n">v</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="p">{};</span> <span class="k">static_assert</span><span class="p">(</span><span class="n">Regular</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">v</span><span class="p">)</span><span class="o">&gt;</span><span class="p">);</span>
</code></pre>
</div>

<p>Quite frankly, this is far more intrusive than needing to learn about Concepts’ constrained variable
syntax, which enables this check, by default; additionally, I wager that it would take a very
dedicated programmer to provide concept checks in such a manner. Then, the code will need to pass a
review, and reviewers mightn’t like such code, or understand why it’s necessary. Arguing that the
regularity is a part of the type deduction is far simpler, and far more readable.</p>

<p>This also doesn’t take contexts where a <code class="highlighter-rouge">static_assert</code> can’t be used directly after the declaration
into consideration. For example, a range-for statement:</p>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="k">for</span> <span class="p">(</span><span class="k">auto</span> <span class="n">i</span> <span class="o">:</span> <span class="n">v</span><span class="p">)</span> <span class="p">{</span>
  <span class="k">static_assert</span><span class="p">(</span><span class="n">Regular</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">&gt;</span><span class="p">);</span>
  <span class="c1">// ...
</span><span class="p">}</span>
</code></pre>
</div>

<p>And we haven’t looked at reference types. To check that the underlying type of a reference is
regular, we ought to strip the reference part, because <code class="highlighter-rouge">Regular&lt;T&amp;&gt;</code> doesn’t mean the same thing as
<code class="highlighter-rouge">Regular&lt;T&gt;</code>. To do that, we need to use <code class="highlighter-rouge">std::decay_t</code>. Or is it <code class="highlighter-rouge">std::remove_reference_t</code>? What
about when <code class="highlighter-rouge">const</code> is involved? That’s <code class="highlighter-rouge">std::remove_const_t</code>. Should I just combine all of them
together and hope for the best? Crap, the order matters too.
<code class="highlighter-rouge">std::remove_reference_t&lt;std::remove_const_t&lt;T&gt;&gt;</code> isn’t the same as
<code class="highlighter-rouge">std::remove_const_t&lt;std::remove_reference_t&lt;T&gt;&gt;</code>. Where does <code class="highlighter-rouge">std::decay</code> fit in again? Is this
snippet right? Is it <em>understandable</em>?</p>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="k">for</span> <span class="p">(</span><span class="k">const</span> <span class="k">auto</span><span class="o">&amp;</span> <span class="n">i</span> <span class="o">:</span> <span class="n">v</span><span class="p">)</span> <span class="p">{</span>
   <span class="k">static_assert</span><span class="p">(</span><span class="n">Regular</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">remove_const_t</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">remove_reference_t</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">&gt;&gt;&gt;</span><span class="p">);</span>
   <span class="c1">// ...
</span><span class="p">}</span>
</code></pre>
</div>

<p>Concepts avoid this issue by going directly to the underlying type, which is checked before the
reference is ever applied. We can use</p>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="k">for</span> <span class="p">(</span><span class="k">const</span> <span class="n">Regular</span><span class="o">&amp;</span> <span class="n">i</span> <span class="o">:</span> <span class="n">v</span><span class="p">)</span> <span class="p">{</span>
  <span class="c1">// ...
</span><span class="p">}</span>
</code></pre>
</div>

<p>and <em>not</em> worry about references or <code class="highlighter-rouge">const</code> types.</p>

<p>Modern C++ programmers shouldn’t need to worry about template metaprogramming on a daily basis.
Novices should worry about template metaprogramming even less than average C++ programmers. The
problem is that we thrust template metaprogramming on to non-experts and non-library developers in
contexts that probably do not require such code. Concepts, especially when paired with Ranges, offer
a way to curb high amounts of template metaprogramming. Eric Niebler’s
<a href="https://github.com/ericniebler/range-v3/">Range-v3</a> library offers no such mechanism; it does not
have language support.</p>

<h2 id="conclusion">Conclusion<a class="anchorjs-link " href="#conclusion" aria-label="Anchor link for: conclusion" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<p>There are arguments that the Concepts TS don’t offer anything to simplify generic programming in
C++, but most overlook the fact that the tools we currently have are Hacky-at-Best<sup>TM</sup>.
Arguments made against diagnostics forget that there is only one reference implementation for
Concepts, and that the “complex” diagnostics resulting from said implementation can always be
improved upon.</p>

<p>Concepts do simplify generic programming when used correctly. As someone who works with templates on
a daily basis, tools such as <code class="highlighter-rouge">enable_if</code> are obscure and tools such as <code class="highlighter-rouge">constexpr if</code> are not always
the correct answer. To add concepts to the mix is to add:</p>

<ul>
  <li>a valuable tool that helps reduce the amount of expert-friendly code by banishing complex template
metaprogramming to concept definitions,</li>
  <li>first-class support for constraint-based type deduction</li>
  <li>offering the opportunity to receive clearer diagnostics</li>
  <li>the choice between <code class="highlighter-rouge">constexpr if</code> and constrained functions when the situation calls for one or
the other.</li>
</ul>

<p>Concepts don’t make any of the above features redundant; nor do any of the above features make
Concepts dead-on-arrival. They instead offer programmers the opportunity to choose the correct tool
for the correct problem. Concepts make C++ better.</p>

<h2 id="acknowledgements">Acknowledgements<a class="anchorjs-link " href="#acknowledgements" aria-label="Anchor link for: acknowledgements" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<p>I would like to thank  Simon Brand, Tom Honermann, Alastair Murray, Ruyman Reyes, Michael Wong, and
Amy Worthington, Peter Žužek for providing their feedback on this paper.</p>

<p>Thank you to Michael for presenting to EWG.</p>

<h2 id="references">References<a class="anchorjs-link " href="#references" aria-label="Anchor link for: references" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<ol>
  <li><em>Relation (mathematics)</em>. Date retrieved: 2017-10-06 16:59. Retrieved from:
<a href="https://simple.wikipedia.org/wiki/Relation_(mathematics)">https://simple.wikipedia.org/wiki/Relation_(mathematics)</a>.</li>
  <li><em>Weak ordering</em>. Date retrieved: 2017-10-06 17:02. Retrieved from:
<a href="https://en.wikipedia.org/wiki/Weak_ordering">https://en.wikipedia.org/wiki/Weak_ordering</a>.</li>
  <li>Alexandrescu, A. <em>There’s Treasure Everywhere</em>. ACCU. Delivered 2016-04-21. Published 2016-05-16.
Date retrieved: 2017-16-10. Retrieved from: <a href="https://youtu.be/AxnotgLql0k">https://youtu.be/AxnotgLql0k</a>.</li>
  <li>Exon Smith, D. <em>P0726R0 Does the Concepts TS Improve on C++17?</em>. 2017-07-07. Retrieved from:
www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0726r0.html.</li>
  <li>Honermann, T. <em>Refining Concepts: Improving error messages</em>. 2016-07-18. Date retrieved:
2017-10-16. Retrieved from:
<a href="http://honermann.net/blog/2016/07/18/refining-concepts-improving-error-messages">http://honermann.net/blog/2016/07/18/refining-concepts-improving-error-messages</a>.</li>
  <li>Muller, J. <em>Implementation Challenge: Concepts in C++14</em>. 2017-09-09. Date retrieved: 2017-10-12.
Retrieved from: <a href="http://foonathan.net/blog/2016/09/09/cpp14-concepts.html">http://foonathan.net/blog/2016/09/09/cpp14-concepts.html</a>.</li>
  <li>Stroustrup, B. <em>The C++ Programming Language</em>. Fourth edition. 2013.
Addison-Wesley. Upper Saddle River, NJ.</li>
  <li>Voutilainen, V. <em>P0225R0 Why I want Concepts, and why I want them sooner rather than later</em>.
International Organization for Standardization. 2016-02-05. Date retrieved: 2017-10-16.
Retrieved from: <a href="http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0225r0.html">http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0225r0.html</a>.</li>
  <li>Wolfram MathWorld. <em>Relation</em>. Date retrieved: 2017-10-06. Retrieved from:
<a href="http://mathworld.wolfram.com/Relation.html">http://mathworld.wolfram.com/Relation.html</a>.</li>
  <li>Wolfram MathWorld. <em>Strict Order</em>. Date retrieved: 2017-10-06. Retrieved from:
<a href="http://mathworld.wolfram.com/StrictOrder.html">http://mathworld.wolfram.com/StrictOrder.html</a>.</li>
</ol>

<h2 id="appendix-a">Appendix A<a class="anchorjs-link " href="#appendix-a" aria-label="Anchor link for: appendix a" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h2>

<ol>
  <li><a href="#listing-1">Listing 1</a></li>
  <li><a href="#listing-2">Listing 2</a></li>
  <li><a href="#listing-3">Listing 3</a></li>
  <li><a href="#listing-4">Listing 4</a></li>
  <li><a href="#listing-5">Listing 5</a></li>
  <li><a href="#listing-6">Listing 6</a></li>
  <li><a href="#listing-7">Listing 7</a></li>
  <li><a href="#listing-8">Listing 8</a></li>
  <li><a href="#listing-9">Listing 9</a></li>
  <li><a href="#listing-10">Listing 10</a></li>
</ol>

<h3 id="listing-1">Listing 1<a class="anchorjs-link " href="#listing-1" aria-label="Anchor link for: listing 1" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source">Source<a class="anchorjs-link " href="#source" aria-label="Anchor link for: source" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;algorithm&gt;
#include &lt;iterator&gt;
#include &lt;list&gt;
</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="k">auto</span> <span class="n">l</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">list</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">};</span>
  <span class="n">std</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">begin</span><span class="p">(</span><span class="n">l</span><span class="p">),</span> <span class="n">std</span><span class="o">::</span><span class="n">end</span><span class="p">(</span><span class="n">l</span><span class="p">));</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic" aria-label="Anchor link for: gcc diagnostic" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::_List_iterator&lt;int&gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:4836:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = std::_List_iterator&lt;int&gt;]'
8 : &lt;source&gt;:8:39:   required from here
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1969:22: error: no match for 'operator-' (operand types are 'std::_List_iterator&lt;int&gt;' and 'std::_List_iterator&lt;int&gt;')
     std::__lg(__last - __first) * 2,
               ~~~~~~~^~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:389:5: note: candidate: template&lt;class _IteratorL, class _IteratorR&gt; constexpr decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator&lt;_Iterator&gt;&amp;, const std::reverse_iterator&lt;_IteratorR&gt;&amp;)
     operator-(const reverse_iterator&lt;_IteratorL&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:389:5: note:   template argument deduction/substitution failed:
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1969:22: note:   'std::_List_iterator&lt;int&gt;' is not derived from 'const std::reverse_iterator&lt;_Iterator&gt;'
     std::__lg(__last - __first) * 2,
               ~~~~~~~^~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1191:5: note: candidate: template&lt;class _IteratorL, class _IteratorR&gt; constexpr decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator&lt;_IteratorL&gt;&amp;, const std::move_iterator&lt;_IteratorR&gt;&amp;)
     operator-(const move_iterator&lt;_IteratorL&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1191:5: note:   template argument deduction/substitution failed:
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1969:22: note:   'std::_List_iterator&lt;int&gt;' is not derived from 'const std::move_iterator&lt;_IteratorL&gt;'
     std::__lg(__last - __first) * 2,
               ~~~~~~~^~~~~~~~~
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="clang-diagnostic">Clang diagnostic<a class="anchorjs-link " href="#clang-diagnostic" aria-label="Anchor link for: clang diagnostic" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4007:40: error: invalid operands to binary expression ('std::__1::__list_iterator&lt;int, void *&gt;' and 'std::__1::__list_iterator&lt;int, void *&gt;')
        difference_type __len = __last - __first;
                                ~~~~~~ ^ ~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4200:5: note: in instantiation of function template specialization 'std::__1::__sort&lt;std::__1::__less&lt;int, int&gt; &amp;, std::__1::__list_iterator&lt;int, void *&gt; &gt;' requested here
    __sort&lt;_Comp_ref&gt;(__first, __last, __comp);
    ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4209:12: note: in instantiation of function template specialization 'std::__1::sort&lt;std::__1::__list_iterator&lt;int, void *&gt;, std::__1::__less&lt;int, int&gt; &gt;' requested here
    _VSTD::sort(__first, __last, __less&lt;typename iterator_traits&lt;_RandomAccessIterator&gt;::value_type&gt;());
           ^
8 : &lt;source&gt;:8:8: note: in instantiation of function template specialization 'std::__1::sort&lt;std::__1::__list_iterator&lt;int, void *&gt; &gt;' requested here
  std::sort(std::begin(l), std::end(l));
       ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:747:1: note: candidate template ignored: could not match 'reverse_iterator' against '__list_iterator'
operator-(const reverse_iterator&lt;_Iter1&gt;&amp; __x, const reverse_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1166:1: note: candidate template ignored: could not match 'move_iterator' against '__list_iterator'
operator-(const move_iterator&lt;_Iter1&gt;&amp; __x, const move_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1571:1: note: candidate template ignored: could not match '__wrap_iter' against '__list_iterator'
operator-(const __wrap_iter&lt;_Iter1&gt;&amp; __x, const __wrap_iter&lt;_Iter2&gt;&amp; __y) _NOEXCEPT_DEBUG
^
In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4098:33: error: invalid operands to binary expression ('std::__1::__list_iterator&lt;int, void *&gt;' and 'std::__1::__list_iterator&lt;int, void *&gt;')
                        if (__i &gt;= __j)
                            ~~~ ^  ~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/utility:583:1: note: candidate template ignored: could not match 'pair' against '__list_iterator'
operator&gt;=(const pair&lt;_T1,_T2&gt;&amp; __x, const pair&lt;_T1,_T2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:730:1: note: candidate template ignored: could not match 'reverse_iterator' against '__list_iterator'
operator&gt;=(const reverse_iterator&lt;_Iter1&gt;&amp; __x, const reverse_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1149:1: note: candidate template ignored: could not match 'move_iterator' against '__list_iterator'
operator&gt;=(const move_iterator&lt;_Iter1&gt;&amp; __x, const move_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1522:1: note: candidate template ignored: could not match '__wrap_iter' against '__list_iterator'
operator&gt;=(const __wrap_iter&lt;_Iter1&gt;&amp; __x, const __wrap_iter&lt;_Iter2&gt;&amp; __y) _NOEXCEPT_DEBUG
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1554:1: note: candidate template ignored: could not match '__wrap_iter' against '__list_iterator'
operator&gt;=(const __wrap_iter&lt;_Iter1&gt;&amp; __x, const __wrap_iter&lt;_Iter1&gt;&amp; __y) _NOEXCEPT_DEBUG
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/tuple:1203:1: note: candidate template ignored: could not match 'tuple' against '__list_iterator'
operator&gt;=(const tuple&lt;_Tp...&gt;&amp; __x, const tuple&lt;_Up...&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2889:1: note: candidate template ignored: could not match 'unique_ptr' against '__list_iterator'
operator&gt;=(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y) {return !(__x &lt; __y);}
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2976:1: note: candidate template ignored: could not match 'unique_ptr' against '__list_iterator'
operator&gt;=(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2984:1: note: candidate template ignored: could not match 'unique_ptr' against '__list_iterator'
operator&gt;=(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4721:1: note: candidate template ignored: could not match 'shared_ptr' against '__list_iterator'
operator&gt;=(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4809:1: note: candidate template ignored: could not match 'shared_ptr' against '__list_iterator'
operator&gt;=(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4817:1: note: candidate template ignored: could not match 'shared_ptr' against '__list_iterator'
operator&gt;=(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/list:2396:1: note: candidate template ignored: could not match 'list' against '__list_iterator'
operator&gt;=(const list&lt;_Tp, _Alloc&gt;&amp; __x, const list&lt;_Tp, _Alloc&gt;&amp; __y)
^
In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4122:17: error: invalid operands to binary expression ('std::__1::__list_iterator&lt;int, void *&gt;' and 'std::__1::__list_iterator&lt;int, void *&gt;')
        if (__i &lt; __j)
            ~~~ ^ ~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/utility:567:1: note: candidate template ignored: could not match 'pair' against '__list_iterator'
operator&lt; (const pair&lt;_T1,_T2&gt;&amp; __x, const pair&lt;_T1,_T2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:706:1: note: candidate template ignored: could not match 'reverse_iterator' against '__list_iterator'
operator&lt;(const reverse_iterator&lt;_Iter1&gt;&amp; __x, const reverse_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1125:1: note: candidate template ignored: could not match 'move_iterator' against '__list_iterator'
operator&lt;(const move_iterator&lt;_Iter1&gt;&amp; __x, const move_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1494:1: note: candidate template ignored: could not match '__wrap_iter' against '__list_iterator'
operator&lt;(const __wrap_iter&lt;_Iter1&gt;&amp; __x, const __wrap_iter&lt;_Iter2&gt;&amp; __y) _NOEXCEPT_DEBUG
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/tuple:1187:1: note: candidate template ignored: could not match 'tuple' against '__list_iterator'
operator&lt;(const tuple&lt;_Tp...&gt;&amp; __x, const tuple&lt;_Up...&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2868:1: note: candidate template ignored: could not match 'unique_ptr' against '__list_iterator'
operator&lt; (const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2926:1: note: candidate template ignored: could not match 'unique_ptr' against '__list_iterator'
operator&lt;(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2935:1: note: candidate template ignored: could not match 'unique_ptr' against '__list_iterator'
operator&lt;(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4696:1: note: candidate template ignored: could not match 'shared_ptr' against '__list_iterator'
operator&lt;(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4761:1: note: candidate template ignored: could not match 'shared_ptr' against '__list_iterator'
operator&lt;(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4769:1: note: candidate template ignored: could not match 'shared_ptr' against '__list_iterator'
operator&lt;(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/list:2372:1: note: candidate template ignored: could not match 'list' against '__list_iterator'
operator&lt; (const list&lt;_Tp, _Alloc&gt;&amp; __x, const list&lt;_Tp, _Alloc&gt;&amp; __y)
^
In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4156:65: error: invalid operands to binary expression ('std::__1::__list_iterator&lt;int, void *&gt;' and 'int')
            if (_VSTD::__insertion_sort_incomplete&lt;_Compare&gt;(__i+1, __last, __comp))
                                                             ~~~^~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:765:1: note: candidate template ignored: could not match 'reverse_iterator&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename reverse_iterator&lt;_Iter&gt;::difference_type __n, const reverse_iterator&lt;_Iter&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1184:1: note: candidate template ignored: could not match 'move_iterator&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename move_iterator&lt;_Iter&gt;::difference_type __n, const move_iterator&lt;_Iter&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1597:1: note: candidate template ignored: could not match '__wrap_iter&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename __wrap_iter&lt;_Iter&gt;::difference_type __n,
^
In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4173:17: error: invalid operands to binary expression ('std::__1::__list_iterator&lt;int, void *&gt;' and 'std::__1::__list_iterator&lt;int, void *&gt;')
        if (__i - __first &lt; __last - __i)
            ~~~ ^ ~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:747:1: note: candidate template ignored: could not match 'reverse_iterator' against '__list_iterator'
operator-(const reverse_iterator&lt;_Iter1&gt;&amp; __x, const reverse_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1166:1: note: candidate template ignored: could not match 'move_iterator' against '__list_iterator'
operator-(const move_iterator&lt;_Iter1&gt;&amp; __x, const move_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1571:1: note: candidate template ignored: could not match '__wrap_iter' against '__list_iterator'
operator-(const __wrap_iter&lt;_Iter1&gt;&amp; __x, const __wrap_iter&lt;_Iter2&gt;&amp; __y) _NOEXCEPT_DEBUG
^
In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3915:20: error: invalid operands to binary expression ('std::__1::__list_iterator&lt;int, void *&gt;' and 'std::__1::__list_iterator&lt;int, void *&gt;')
    switch (__last - __first)
            ~~~~~~ ^ ~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4155:32: note: in instantiation of function template specialization 'std::__1::__insertion_sort_incomplete&lt;std::__1::__less&lt;int, int&gt; &amp;, std::__1::__list_iterator&lt;int, void *&gt; &gt;' requested here
            bool __fs = _VSTD::__insertion_sort_incomplete&lt;_Compare&gt;(__first, __i, __comp);
                               ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4200:5: note: in instantiation of function template specialization 'std::__1::__sort&lt;std::__1::__less&lt;int, int&gt; &amp;, std::__1::__list_iterator&lt;int, void *&gt; &gt;' requested here
    __sort&lt;_Comp_ref&gt;(__first, __last, __comp);
    ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4209:12: note: in instantiation of function template specialization 'std::__1::sort&lt;std::__1::__list_iterator&lt;int, void *&gt;, std::__1::__less&lt;int, int&gt; &gt;' requested here
    _VSTD::sort(__first, __last, __less&lt;typename iterator_traits&lt;_RandomAccessIterator&gt;::value_type&gt;());
           ^
8 : &lt;source&gt;:8:8: note: in instantiation of function template specialization 'std::__1::sort&lt;std::__1::__list_iterator&lt;int, void *&gt; &gt;' requested here
  std::sort(std::begin(l), std::end(l));
       ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:747:1: note: candidate template ignored: could not match 'reverse_iterator' against '__list_iterator'
operator-(const reverse_iterator&lt;_Iter1&gt;&amp; __x, const reverse_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1166:1: note: candidate template ignored: could not match 'move_iterator' against '__list_iterator'
operator-(const move_iterator&lt;_Iter1&gt;&amp; __x, const move_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1571:1: note: candidate template ignored: could not match '__wrap_iter' against '__list_iterator'
operator-(const __wrap_iter&lt;_Iter1&gt;&amp; __x, const __wrap_iter&lt;_Iter2&gt;&amp; __y) _NOEXCEPT_DEBUG
^
In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3935:40: error: invalid operands to binary expression ('std::__1::__list_iterator&lt;int, void *&gt;' and 'int')
    _RandomAccessIterator __j = __first+2;
                                ~~~~~~~^~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:765:1: note: candidate template ignored: could not match 'reverse_iterator&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename reverse_iterator&lt;_Iter&gt;::difference_type __n, const reverse_iterator&lt;_Iter&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1184:1: note: candidate template ignored: could not match 'move_iterator&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename move_iterator&lt;_Iter&gt;::difference_type __n, const move_iterator&lt;_Iter&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1597:1: note: candidate template ignored: could not match '__wrap_iter&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename __wrap_iter&lt;_Iter&gt;::difference_type __n,
^
In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3936:39: error: invalid operands to binary expression ('std::__1::__list_iterator&lt;int, void *&gt;' and 'int')
    __sort3&lt;_Compare&gt;(__first, __first+1, __j, __comp);
                               ~~~~~~~^~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:765:1: note: candidate template ignored: could not match 'reverse_iterator&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename reverse_iterator&lt;_Iter&gt;::difference_type __n, const reverse_iterator&lt;_Iter&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1184:1: note: candidate template ignored: could not match 'move_iterator&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename move_iterator&lt;_Iter&gt;::difference_type __n, const move_iterator&lt;_Iter&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1597:1: note: candidate template ignored: could not match '__wrap_iter&lt;type-parameter-0-0&gt;' against 'int'
operator+(typename __wrap_iter&lt;_Iter&gt;::difference_type __n,
^
8 errors generated.
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="msvc-diagnostic">MSVC diagnostic<a class="anchorjs-link " href="#msvc-diagnostic" aria-label="Anchor link for: msvc diagnostic" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>example.cpp
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/xlocale(314): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
7 : &lt;source&gt;(7): error C2955: 'std::list': use of class template requires template argument list
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/list(879): note: see declaration of 'std::list'
8 : &lt;source&gt;(8): error C3536: 'l': cannot be used before it is initialized
8 : &lt;source&gt;(8): error C2672: 'std::begin': no matching overloaded function found
8 : &lt;source&gt;(8): error C2893: Failed to specialize function template 'unknown-type std::begin(_Container &amp;)'
8 : &lt;source&gt;(8): note: With the following template arguments:
8 : &lt;source&gt;(8): note: '_Container=int'
8 : &lt;source&gt;(8): error C2784: 'const _Elem *std::begin(std::initializer_list&lt;_Elem&gt;) noexcept': could not deduce template argument for 'std::initializer_list&lt;_Elem&gt;' from 'int'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/initializer_list(61): note: see declaration of 'std::begin'
8 : &lt;source&gt;(8): error C2672: 'std::end': no matching overloaded function found
8 : &lt;source&gt;(8): error C2893: Failed to specialize function template 'unknown-type std::end(_Container &amp;)'
8 : &lt;source&gt;(8): note: With the following template arguments:
8 : &lt;source&gt;(8): note: '_Container=int'
8 : &lt;source&gt;(8): error C2784: 'const _Elem *std::end(std::initializer_list&lt;_Elem&gt;) noexcept': could not deduce template argument for 'std::initializer_list&lt;_Elem&gt;' from 'int'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/initializer_list(68): note: see declaration of 'std::end'
8 : &lt;source&gt;(8): error C2672: 'std::sort': no matching overloaded function found
8 : &lt;source&gt;(8): error C2780: 'void std::sort(_RanIt,_RanIt)': expects 2 arguments - 1 provided
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2921): note: see declaration of 'std::sort'
8 : &lt;source&gt;(8): error C2780: 'void std::sort(_RanIt,_RanIt,_Pr)': expects 3 arguments - 1 provided
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2913): note: see declaration of 'std::sort'
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
Compiler exited with result code 2
</code></pre>
</div>

<h3 id="listing-2">Listing 2<a class="anchorjs-link " href="#listing-2" aria-label="Anchor link for: listing 2" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-1">Source<a class="anchorjs-link " href="#source-1" aria-label="Anchor link for: source 1" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;list&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="k">auto</span> <span class="n">l</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">list</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">};</span>
  <span class="n">ranges</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">ranges</span><span class="o">::</span><span class="n">begin</span><span class="p">(</span><span class="n">l</span><span class="p">),</span> <span class="n">ranges</span><span class="o">::</span><span class="n">end</span><span class="p">(</span><span class="n">l</span><span class="p">));</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-1">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-1" aria-label="Anchor link for: gcc diagnostic 1" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>&lt;source&gt;: In function 'int main()':
10 : &lt;source&gt;:10:48: error: no matching function for call to 'sort(std::_List_iterator&lt;int&gt;, std::_List_iterator&lt;int&gt;)'
   ranges::sort(ranges::begin(l), ranges::end(l));
                                                ^
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:90:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:31:4: note: candidate: I std::experimental::ranges::v1::sort(I, S, Comp, Proj) [with I = std::_List_iterator&lt;int&gt;; S = std::_List_iterator&lt;int&gt;; Comp = std::experimental::ranges::v1::less&lt;void&gt;; Proj = std::experimental::ranges::v1::identity]
  I sort(I first, S sent, Comp comp = Comp{}, Proj proj = Proj{})
    ^~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:31:4: note:   constraints not satisfied
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/basic_iterator.hpp:23:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/any_iterator.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/iterator.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/adjacent_find.hpp:17,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:18,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:652:15: note: within 'template&lt;class I&gt; concept const bool std::experimental::ranges::v1::RandomAccessIterator&lt;I&gt; [with I = std::_List_iterator&lt;int&gt;]'
  concept bool RandomAccessIterator =
               ^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/type_traits.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:76:15: note: within 'template&lt;class T, class U&gt; concept const bool std::experimental::ranges::v1::DerivedFrom&lt;T, U&gt; [with T = std::experimental::ranges::v1::bidirectional_iterator_tag; U = std::experimental::ranges::v1::random_access_iterator_tag]'
  concept bool DerivedFrom =
               ^~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:76:15: note:   'std::experimental::ranges::v1::random_access_iterator_tag' is not a base of 'std::experimental::ranges::v1::bidirectional_iterator_tag'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:76:15: note: 'std::is_convertible&lt;std::experimental::ranges::v1::bidirectional_iterator_tag*, std::experimental::ranges::v1::random_access_iterator_tag*&gt;::value' evaluated to false
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/basic_iterator.hpp:23:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/any_iterator.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/iterator.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/adjacent_find.hpp:17,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:18,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:545:15: note: within 'template&lt;class S, class I&gt; concept const bool std::experimental::ranges::v1::SizedSentinel&lt;S, I&gt; [with S = std::_List_iterator&lt;int&gt;; I = std::_List_iterator&lt;int&gt;]'
  concept bool SizedSentinel =
               ^~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:545:15: note:     with 'const std::_List_iterator&lt;int&gt; i'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:545:15: note:     with 'const std::_List_iterator&lt;int&gt; s'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:545:15: note: the required expression '(s - i)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:545:15: note: the required expression '(i - s)' would be ill-formed
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/regular.hpp:17:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object.hpp:20,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:140:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::StrictTotallyOrdered&lt;T&gt; [with T = std::_List_iterator&lt;int&gt;]'
  concept bool StrictTotallyOrdered =
               ^~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:125:15: note: within 'template&lt;class T, class U&gt; concept const bool std::experimental::ranges::v1::__totally_ordered&lt;T, U&gt; [with T = std::_List_iterator&lt;int&gt;; U = std::_List_iterator&lt;int&gt;]'
  concept bool __totally_ordered =
               ^~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:125:15: note:     with 'std::remove_reference_t&lt;std::_List_iterator&lt;int&gt; &gt;&amp; t'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:125:15: note:     with 'std::remove_reference_t&lt;std::_List_iterator&lt;int&gt; &gt;&amp; u'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:125:15: note: the required expression '(t &lt; u)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:125:15: note: the required expression '(t &gt; u)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:125:15: note: the required expression '(t &lt;= u)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:125:15: note: the required expression '(t &gt;= u)' would be ill-formed
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:27:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/basic_iterator.hpp:23,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/any_iterator.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/iterator.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/adjacent_find.hpp:17,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:18,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note: within 'template&lt;class I&gt; concept const bool std::experimental::ranges::v1::ext::RandomAccessIncrementable&lt;I&gt; [with I = std::_List_iterator&lt;int&gt;]'
   concept bool RandomAccessIncrementable =
                ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note:     with 'std::_List_iterator&lt;int&gt;&amp; i'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note:     with 'const std::_List_iterator&lt;int&gt;&amp; ci'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note:     with 'std::experimental::ranges::v1::difference_type_t&lt;std::_List_iterator&lt;int&gt; &gt; n'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression 'i += n' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression 'i -= n' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression '(ci + n)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression '(n + ci)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression '(ci - n)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/increment.hpp:138:16: note: the required expression '(ci - ci)' would be ill-formed
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/basic_iterator.hpp:23:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/any_iterator.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/iterator.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/adjacent_find.hpp:17,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:18,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:652:15: note:     with 'const std::_List_iterator&lt;int&gt;&amp; ci'
  concept bool RandomAccessIterator =
               ^~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:652:15: note:     with 'std::experimental::ranges::v1::difference_type_t&lt;std::_List_iterator&lt;int&gt; &gt; n'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/iterator/concepts.hpp:652:15: note: the required expression 'ci[n]' would be ill-formed
10 : &lt;source&gt;:10:48: note: ill-formed constraint
   ranges::sort(ranges::begin(l), ranges::end(l));
                                                ^
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:90:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:46:23: note: candidate: template&lt;class Rng, class Comp, class Proj&gt;  requires  RandomAccessRange&lt;Rng&gt; and Sortable&lt;decltype((std::experimental::ranges::v1::&lt;unnamed&gt;::begin)((declval&lt;R&amp;&gt;)())), Comp, Proj&gt; std::experimental::ranges::v1::safe_iterator_t&lt;Rng&gt; std::experimental::ranges::v1::sort(Rng&amp;&amp;, Comp, Proj)
  safe_iterator_t&lt;Rng&gt; sort(Rng&amp;&amp; rng, Comp comp = Comp{}, Proj proj = Proj{})
                       ^~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:46:23: note:   template argument deduction/substitution failed:
Compiler exited with result code 1
</code></pre>
</div>

<h3 id="listing-3">Listing 3<a class="anchorjs-link " href="#listing-3" aria-label="Anchor link for: listing 3" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-2">Source<a class="anchorjs-link " href="#source-2" aria-label="Anchor link for: source 2" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;algorithm&gt;
#include &lt;iterator&gt;
#include &lt;vector&gt;
</span>
<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{};</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="k">auto</span> <span class="n">l</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span><span class="p">{};</span>
  <span class="n">std</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">begin</span><span class="p">(</span><span class="n">l</span><span class="p">),</span> <span class="n">std</span><span class="o">::</span><span class="n">end</span><span class="p">(</span><span class="n">l</span><span class="p">));</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-2">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-2" aria-label="Anchor link for: gcc diagnostic 2" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:71:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Iterator2 = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;]':
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:81:17:   required from 'void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1921:34:   required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1953:38:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1968:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:4836:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;]'
10 : &lt;source&gt;:10:39:   required from here
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:43:23: error: no match for 'operator&lt;' (operand types are 'Foo' and 'Foo')
       { return *__it1 &lt; *__it2; }
                ~~~~~~~^~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:888:5: note: candidate: template&lt;class _IteratorL, class _IteratorR, class _Container&gt; bool __gnu_cxx::operator&lt;(const __gnu_cxx::__normal_iterator&lt;_IteratorL, _Container&gt;&amp;, const __gnu_cxx::__normal_iterator&lt;_IteratorR, _Container&gt;&amp;)
     operator&lt;(const __normal_iterator&lt;_IteratorL, _Container&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:888:5: note:   template argument deduction/substitution failed:
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:71:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:43:23: note:   'Foo' is not derived from 'const __gnu_cxx::__normal_iterator&lt;_IteratorL, _Container&gt;'
       { return *__it1 &lt; *__it2; }
                ~~~~~~~^~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:895:5: note: candidate: template&lt;class _Iterator, class _Container&gt; bool __gnu_cxx::operator&lt;(const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;&amp;, const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;&amp;)
     operator&lt;(const __normal_iterator&lt;_Iterator, _Container&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:895:5: note:   template argument deduction/substitution failed:
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:71:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:43:23: note:   'Foo' is not derived from 'const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;'
       { return *__it1 &lt; *__it2; }
                ~~~~~~~^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_less_iter::operator()(_Value&amp;, _Iterator) const [with _Value = Foo; _Iterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;]':
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1828:20:   required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Val_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1855:36:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1885:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1971:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:4836:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;]'
10 : &lt;source&gt;:10:39:   required from here
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:90:22: error: no match for 'operator&lt;' (operand types are 'Foo' and 'Foo')
       { return __val &lt; *__it; }
                ~~~~~~^~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:888:5: note: candidate: template&lt;class _IteratorL, class _IteratorR, class _Container&gt; bool __gnu_cxx::operator&lt;(const __gnu_cxx::__normal_iterator&lt;_IteratorL, _Container&gt;&amp;, const __gnu_cxx::__normal_iterator&lt;_IteratorR, _Container&gt;&amp;)
     operator&lt;(const __normal_iterator&lt;_IteratorL, _Container&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:888:5: note:   template argument deduction/substitution failed:
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:71:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:90:22: note:   'Foo' is not derived from 'const __gnu_cxx::__normal_iterator&lt;_IteratorL, _Container&gt;'
       { return __val &lt; *__it; }
                ~~~~~~^~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:895:5: note: candidate: template&lt;class _Iterator, class _Container&gt; bool __gnu_cxx::operator&lt;(const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;&amp;, const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;&amp;)
     operator&lt;(const __normal_iterator&lt;_Iterator, _Container&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:895:5: note:   template argument deduction/substitution failed:
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:71:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:90:22: note:   'Foo' is not derived from 'const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;'
       { return __val &lt; *__it; }
                ~~~~~~^~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_val::operator()(_Iterator, _Value&amp;) const [with _Iterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Value = Foo]':
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_heap.h:133:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&amp;) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Distance = long int; _Tp = Foo; _Compare = __gnu_cxx::__ops::_Iter_less_val]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_heap.h:237:23:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Distance = long int; _Tp = Foo; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_heap.h:342:22:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&amp;) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1672:23:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1933:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1948:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:1968:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algo.h:4836:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator&lt;Foo*, std::vector&lt;Foo&gt; &gt;]'
10 : &lt;source&gt;:10:39:   required from here
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:65:22: error: no match for 'operator&lt;' (operand types are 'Foo' and 'Foo')
       { return *__it &lt; __val; }
                ~~~~~~^~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:888:5: note: candidate: template&lt;class _IteratorL, class _IteratorR, class _Container&gt; bool __gnu_cxx::operator&lt;(const __gnu_cxx::__normal_iterator&lt;_IteratorL, _Container&gt;&amp;, const __gnu_cxx::__normal_iterator&lt;_IteratorR, _Container&gt;&amp;)
     operator&lt;(const __normal_iterator&lt;_IteratorL, _Container&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:888:5: note:   template argument deduction/substitution failed:
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:71:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:65:22: note:   'Foo' is not derived from 'const __gnu_cxx::__normal_iterator&lt;_IteratorL, _Container&gt;'
       { return *__it &lt; __val; }
                ~~~~~~^~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:895:5: note: candidate: template&lt;class _Iterator, class _Container&gt; bool __gnu_cxx::operator&lt;(const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;&amp;, const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;&amp;)
     operator&lt;(const __normal_iterator&lt;_Iterator, _Container&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:895:5: note:   template argument deduction/substitution failed:
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:71:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/predefined_ops.h:65:22: note:   'Foo' is not derived from 'const __gnu_cxx::__normal_iterator&lt;_Iterator, _Container&gt;'
       { return *__it &lt; __val; }
                ~~~~~~^~~~~~~
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="clang-diagnostic-1">Clang diagnostic<a class="anchorjs-link " href="#clang-diagnostic-1" aria-label="Anchor link for: clang diagnostic 1" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:719:71: error: invalid operands to binary expression ('const Foo' and 'const Foo')
    bool operator()(const _T1&amp; __x, const _T1&amp; __y) const {return __x &lt; __y;}
                                                                  ~~~ ^ ~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4014:17: note: in instantiation of member function 'std::__1::__less&lt;Foo, Foo&gt;::operator()' requested here
            if (__comp(*--__last, *__first))
                ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4200:5: note: in instantiation of function template specialization 'std::__1::__sort&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
    __sort&lt;_Comp_ref&gt;(__first, __last, __comp);
    ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4209:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *, std::__1::__less&lt;Foo, Foo&gt; &gt;' requested here
    _VSTD::sort(__first, __last, __less&lt;typename iterator_traits&lt;_RandomAccessIterator&gt;::value_type&gt;());
           ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4225:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *&gt;' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
10 : &lt;source&gt;:10:8: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo&gt;' requested here
  std::sort(std::begin(l), std::end(l));
       ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/utility:567:1: note: candidate template ignored: could not match 'pair&lt;type-parameter-0-0, type-parameter-0-1&gt;' against 'const Foo'
operator&lt; (const pair&lt;_T1,_T2&gt;&amp; __x, const pair&lt;_T1,_T2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:706:1: note: candidate template ignored: could not match 'reverse_iterator&lt;type-parameter-0-0&gt;' against 'const Foo'
operator&lt;(const reverse_iterator&lt;_Iter1&gt;&amp; __x, const reverse_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1125:1: note: candidate template ignored: could not match 'move_iterator&lt;type-parameter-0-0&gt;' against 'const Foo'
operator&lt;(const move_iterator&lt;_Iter1&gt;&amp; __x, const move_iterator&lt;_Iter2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/iterator:1494:1: note: candidate template ignored: could not match '__wrap_iter&lt;type-parameter-0-0&gt;' against 'const Foo'
operator&lt;(const __wrap_iter&lt;_Iter1&gt;&amp; __x, const __wrap_iter&lt;_Iter2&gt;&amp; __y) _NOEXCEPT_DEBUG
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/tuple:1187:1: note: candidate template ignored: could not match 'tuple&lt;type-parameter-0-0...&gt;' against 'const Foo'
operator&lt;(const tuple&lt;_Tp...&gt;&amp; __x, const tuple&lt;_Up...&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2868:1: note: candidate template ignored: could not match 'unique_ptr&lt;type-parameter-0-0, type-parameter-0-1&gt;' against 'const Foo'
operator&lt; (const unique_ptr&lt;_T1, _D1&gt;&amp; __x, const unique_ptr&lt;_T2, _D2&gt;&amp; __y)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2926:1: note: candidate template ignored: could not match 'unique_ptr&lt;type-parameter-0-0, type-parameter-0-1&gt;' against 'const Foo'
operator&lt;(const unique_ptr&lt;_T1, _D1&gt;&amp; __x, nullptr_t)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:2935:1: note: candidate template ignored: could not match 'unique_ptr&lt;type-parameter-0-0, type-parameter-0-1&gt;' against 'const Foo'
operator&lt;(nullptr_t, const unique_ptr&lt;_T1, _D1&gt;&amp; __x)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4696:1: note: candidate template ignored: could not match 'shared_ptr&lt;type-parameter-0-0&gt;' against 'const Foo'
operator&lt;(const shared_ptr&lt;_Tp&gt;&amp; __x, const shared_ptr&lt;_Up&gt;&amp; __y) _NOEXCEPT
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4761:1: note: candidate template ignored: could not match 'shared_ptr&lt;type-parameter-0-0&gt;' against 'const Foo'
operator&lt;(const shared_ptr&lt;_Tp&gt;&amp; __x, nullptr_t) _NOEXCEPT
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/memory:4769:1: note: candidate template ignored: could not match 'shared_ptr&lt;type-parameter-0-0&gt;' against 'const Foo'
operator&lt;(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __x) _NOEXCEPT
^
In file included from &lt;source&gt;:1:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3801:20: error: no matching function for call to '__sort3'
    unsigned __r = __sort3&lt;_Compare&gt;(__x1, __x2, __x3, __c);
                   ^~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4021:20: note: in instantiation of function template specialization 'std::__1::__sort4&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
            _VSTD::__sort4&lt;_Compare&gt;(__first, __first+1, __first+2, --__last, __comp);
                   ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4200:5: note: in instantiation of function template specialization 'std::__1::__sort&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
    __sort&lt;_Comp_ref&gt;(__first, __last, __comp);
    ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4209:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *, std::__1::__less&lt;Foo, Foo&gt; &gt;' requested here
    _VSTD::sort(__first, __last, __less&lt;typename iterator_traits&lt;_RandomAccessIterator&gt;::value_type&gt;());
           ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4225:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *&gt;' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
10 : &lt;source&gt;:10:8: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo&gt;' requested here
  std::sort(std::begin(l), std::end(l));
       ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3761:1: note: candidate template ignored: substitution failure [with _Compare = std::__1::__less&lt;Foo, Foo&gt; &amp;, _ForwardIterator = Foo *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3827:20: error: no matching function for call to '__sort4'
    unsigned __r = __sort4&lt;_Compare&gt;(__x1, __x2, __x3, __x4, __c);
                   ^~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4024:20: note: in instantiation of function template specialization 'std::__1::__sort5&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
            _VSTD::__sort5&lt;_Compare&gt;(__first, __first+1, __first+2, __first+3, --__last, __comp);
                   ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4200:5: note: in instantiation of function template specialization 'std::__1::__sort&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
    __sort&lt;_Comp_ref&gt;(__first, __last, __comp);
    ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4209:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *, std::__1::__less&lt;Foo, Foo&gt; &gt;' requested here
    _VSTD::sort(__first, __last, __less&lt;typename iterator_traits&lt;_RandomAccessIterator&gt;::value_type&gt;());
           ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4225:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *&gt;' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
10 : &lt;source&gt;:10:8: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo&gt;' requested here
  std::sort(std::begin(l), std::end(l));
       ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3798:1: note: candidate template ignored: substitution failure [with _Compare = std::__1::__less&lt;Foo, Foo&gt; &amp;, _ForwardIterator = Foo *]
__sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3892:5: error: no matching function for call to '__sort3'
    __sort3&lt;_Compare&gt;(__first, __first+1, __j, __comp);
    ^~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4029:20: note: in instantiation of function template specialization 'std::__1::__insertion_sort_3&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
            _VSTD::__insertion_sort_3&lt;_Compare&gt;(__first, __last, __comp);
                   ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4200:5: note: in instantiation of function template specialization 'std::__1::__sort&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
    __sort&lt;_Comp_ref&gt;(__first, __last, __comp);
    ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4209:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *, std::__1::__less&lt;Foo, Foo&gt; &gt;' requested here
    _VSTD::sort(__first, __last, __less&lt;typename iterator_traits&lt;_RandomAccessIterator&gt;::value_type&gt;());
           ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4225:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *&gt;' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
10 : &lt;source&gt;:10:8: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo&gt;' requested here
  std::sort(std::begin(l), std::end(l));
       ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3761:1: note: candidate template ignored: substitution failure [with _Compare = std::__1::__less&lt;Foo, Foo&gt; &amp;, _ForwardIterator = Foo *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3925:9: error: no matching function for call to '__sort3'
        _VSTD::__sort3&lt;_Compare&gt;(__first, __first+1, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/__config:441:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4155:32: note: in instantiation of function template specialization 'std::__1::__insertion_sort_incomplete&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
            bool __fs = _VSTD::__insertion_sort_incomplete&lt;_Compare&gt;(__first, __i, __comp);
                               ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4200:5: note: in instantiation of function template specialization 'std::__1::__sort&lt;std::__1::__less&lt;Foo, Foo&gt; &amp;, Foo *&gt;' requested here
    __sort&lt;_Comp_ref&gt;(__first, __last, __comp);
    ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4209:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *, std::__1::__less&lt;Foo, Foo&gt; &gt;' requested here
    _VSTD::sort(__first, __last, __less&lt;typename iterator_traits&lt;_RandomAccessIterator&gt;::value_type&gt;());
           ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:4225:12: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo *&gt;' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
10 : &lt;source&gt;:10:8: note: in instantiation of function template specialization 'std::__1::sort&lt;Foo&gt;' requested here
  std::sort(std::begin(l), std::end(l));
       ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3761:1: note: candidate template ignored: substitution failure [with _Compare = std::__1::__less&lt;Foo, Foo&gt; &amp;, _ForwardIterator = Foo *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3928:9: error: no matching function for call to '__sort4'
        _VSTD::__sort4&lt;_Compare&gt;(__first, __first+1, __first+2, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/__config:441:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3798:1: note: candidate template ignored: substitution failure [with _Compare = std::__1::__less&lt;Foo, Foo&gt; &amp;, _ForwardIterator = Foo *]
__sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3931:9: error: no matching function for call to '__sort5'
        _VSTD::__sort5&lt;_Compare&gt;(__first, __first+1, __first+2, __first+3, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/__config:441:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3824:1: note: candidate template ignored: substitution failure [with _Compare = std::__1::__less&lt;Foo, Foo&gt; &amp;, _ForwardIterator = Foo *]
__sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3936:5: error: no matching function for call to '__sort3'
    __sort3&lt;_Compare&gt;(__first, __first+1, __j, __comp);
    ^~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/algorithm:3761:1: note: candidate template ignored: substitution failure [with _Compare = std::__1::__less&lt;Foo, Foo&gt; &amp;, _ForwardIterator = Foo *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
8 errors generated.
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="msvc-diagnostic-1">MSVC diagnostic<a class="anchorjs-link " href="#msvc-diagnostic-1" aria-label="Anchor link for: msvc diagnostic 1" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>example.cpp
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/xlocale(314): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2823): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2880): note: see reference to function template instantiation 'std::pair&lt;_RanIt,_RanIt&gt; std::_Partition_by_median_guess_unchecked&lt;_RanIt,_Pr&gt;(_RanIt,_RanIt,_Pr &amp;)' being compiled
        with
        [
            _RanIt=Foo *,
            _Pr=std::less&lt;void&gt;
        ]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2908): note: see reference to function template instantiation 'void std::_Sort_unchecked1&lt;_RanIt,__int64,_Pr&gt;(_RanIt,_RanIt,_Diff,_Pr &amp;)' being compiled
        with
        [
            _RanIt=Foo *,
            _Pr=std::less&lt;void&gt;,
            _Diff=__int64
        ]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2916): note: see reference to function template instantiation 'void std::_Sort_unchecked&lt;Foo*,_Pr&gt;(_RanIt,_RanIt,_Pr &amp;)' being compiled
        with
        [
            _Pr=std::less&lt;void&gt;,
            _RanIt=Foo *
        ]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2923): note: see reference to function template instantiation 'void std::sort&lt;_RanIt,std::less&lt;void&gt;&gt;(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=std::_Vector_iterator&lt;std::_Vector_val&lt;std::_Simple_types&lt;Foo&gt;&gt;&gt;,
            _Pr=std::less&lt;void&gt;
        ]
10 : &lt;source&gt;(10): note: see reference to function template instantiation 'void std::sort&lt;std::_Vector_iterator&lt;std::_Vector_val&lt;std::_Simple_types&lt;Foo&gt;&gt;&gt;&gt;(_RanIt,_RanIt)' being compiled
        with
        [
            _RanIt=std::_Vector_iterator&lt;std::_Vector_val&lt;std::_Simple_types&lt;Foo&gt;&gt;&gt;
        ]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2823): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2823): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2823): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2823): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2824): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2824): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2824): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2824): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2824): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2827): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2827): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2827): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2827): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2827): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2828): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2828): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2828): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2828): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2828): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2837): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2837): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2837): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2837): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2837): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2839): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2839): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2839): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2839): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2839): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2844): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2844): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2844): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2844): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2844): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2846): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2846): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2846): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2846): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2846): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2766): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2901): note: see reference to function template instantiation 'void std::_Insertion_sort_unchecked&lt;_RanIt,_Pr&gt;(_BidIt,_BidIt,_Pr &amp;)' being compiled
        with
        [
            _RanIt=Foo *,
            _Pr=std::less&lt;void&gt;,
            _BidIt=Foo *
        ]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2766): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2766): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2766): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2766): note: '_Ty2=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2774): error C2672: 'operator __surrogate_func': no matching overloaded function found
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2774): error C2893: Failed to specialize function template 'unknown-type std::less&lt;void&gt;::operator ()(_Ty1 &amp;&amp;,_Ty2 &amp;&amp;) const'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2774): note: With the following template arguments:
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2774): note: '_Ty1=Foo &amp;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/algorithm(2774): note: '_Ty2=Foo &amp;'
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
Compiler exited with result code 2
</code></pre>
</div>

<h3 id="listing-4">Listing 4<a class="anchorjs-link " href="#listing-4" aria-label="Anchor link for: listing 4" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-3">Source<a class="anchorjs-link " href="#source-3" aria-label="Anchor link for: source 3" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;vector&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>

<span class="k">class</span> <span class="nc">Non_sortable</span> <span class="p">{};</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="k">auto</span> <span class="n">l</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">Non_sortable</span><span class="o">&gt;</span><span class="p">{};</span>
  <span class="n">ranges</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">ranges</span><span class="o">::</span><span class="n">begin</span><span class="p">(</span><span class="n">l</span><span class="p">),</span> <span class="n">ranges</span><span class="o">::</span><span class="n">end</span><span class="p">(</span><span class="n">l</span><span class="p">));</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-3">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-3" aria-label="Anchor link for: gcc diagnostic 3" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>&lt;source&gt;: In function 'int main()':
12 : &lt;source&gt;:12:48: error: no matching function for call to 'sort(__gnu_cxx::__normal_iterator&lt;Non_sortable*, std::vector&lt;Non_sortable&gt; &gt;, __gnu_cxx::__normal_iterator&lt;Non_sortable*, std::vector&lt;Non_sortable&gt; &gt;)'
   ranges::sort(ranges::begin(l), ranges::end(l));
                                                ^
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:90:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:31:4: note: candidate: I std::experimental::ranges::v1::sort(I, S, Comp, Proj) [with I = __gnu_cxx::__normal_iterator&lt;Non_sortable*, std::vector&lt;Non_sortable&gt; &gt;; S = __gnu_cxx::__normal_iterator&lt;Non_sortable*, std::vector&lt;Non_sortable&gt; &gt;; Comp = std::experimental::ranges::v1::less&lt;void&gt;; Proj = std::experimental::ranges::v1::identity]
  I sort(I first, S sent, Comp comp = Comp{}, Proj proj = Proj{})
    ^~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:31:4: note:   constraints not satisfied
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/partition_point.hpp:28:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/lower_bound.hpp:18,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/binary_search.hpp:18,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:21,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/algorithm.hpp:79:15: note: within 'template&lt;class I, class R, class P&gt; concept const bool std::experimental::ranges::v1::Sortable&lt;I, R, P&gt; [with I = __gnu_cxx::__normal_iterator&lt;Non_sortable*, std::vector&lt;Non_sortable&gt; &gt;; R = std::experimental::ranges::v1::less&lt;void&gt;; P = std::experimental::ranges::v1::identity]'
  concept bool Sortable =
               ^~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/adjacent_find.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:18,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/callable.hpp:187:15: note: within 'template&lt;class F, class I1, class I2&gt; concept const bool std::experimental::ranges::v1::IndirectStrictWeakOrder&lt;F, I1, I2&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;; I1 = std::experimental::ranges::v1::projected&lt;__gnu_cxx::__normal_iterator&lt;Non_sortable*, std::vector&lt;Non_sortable&gt; &gt;, std::experimental::ranges::v1::identity&gt;; I2 = std::experimental::ranges::v1::projected&lt;__gnu_cxx::__normal_iterator&lt;Non_sortable*, std::vector&lt;Non_sortable&gt; &gt;, std::experimental::ranges::v1::identity&gt;]'
  concept bool IndirectStrictWeakOrder =
               ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/functional/not_fn.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/functional.hpp:24,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/adjacent_find.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:18,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:103:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::StrictWeakOrder&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool StrictWeakOrder =
               ^~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::Relation&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool Relation =
               ^~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, const Non_sortable&amp;, const Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {const Non_sortable&amp;, const Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:103:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::StrictWeakOrder&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool StrictWeakOrder =
               ^~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::Relation&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool Relation =
               ^~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, const Non_sortable&amp;, const Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {const Non_sortable&amp;, const Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:103:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::StrictWeakOrder&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool StrictWeakOrder =
               ^~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::Relation&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool Relation =
               ^~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, const Non_sortable&amp;, const Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {const Non_sortable&amp;, const Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:103:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::StrictWeakOrder&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool StrictWeakOrder =
               ^~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::Relation&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool Relation =
               ^~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, Non_sortable&amp;, Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {Non_sortable&amp;, Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: in the expansion of concept 'Predicate&lt;std::experimental::ranges::v1::less&lt;void&gt;&amp;, const Non_sortable&amp;, const Non_sortable&amp;&gt;' template&lt;class F, class ... Args&gt; concept const bool std::experimental::ranges::v1::Predicate&lt;F, Args ...&gt; [with F = std::experimental::ranges::v1::less&lt;void&gt;&amp;; Args = {const Non_sortable&amp;, const Non_sortable&amp;}]
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:103:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::StrictWeakOrder&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool StrictWeakOrder =
               ^~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/function.hpp:75:15: note: within 'template&lt;class R, class T, class U&gt; concept const bool std::experimental::ranges::v1::Relation&lt;R, T, U&gt; [with R = std::experimental::ranges::v1::less&lt;void&gt;&amp;; T = Non_sortable&amp;; U = Non_sortable&amp;]'
  concept bool Relation =
               ^~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:90:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:31:4: note: ... and 5 more constraint errors not shown
  I sort(I first, S sent, Comp comp = Comp{}, Proj proj = Proj{})
    ^~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:46:23: note: candidate: template&lt;class Rng, class Comp, class Proj&gt;  requires  RandomAccessRange&lt;Rng&gt; and Sortable&lt;decltype((std::experimental::ranges::v1::&lt;unnamed&gt;::begin)((declval&lt;R&amp;&gt;)())), Comp, Proj&gt; std::experimental::ranges::v1::safe_iterator_t&lt;Rng&gt; std::experimental::ranges::v1::sort(Rng&amp;&amp;, Comp, Proj)
  safe_iterator_t&lt;Rng&gt; sort(Rng&amp;&amp; rng, Comp comp = Comp{}, Proj proj = Proj{})
                       ^~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/sort.hpp:46:23: note:   template argument deduction/substitution failed:
Compiler exited with result code 1
</code></pre>
</div>

<h3 id="listing-5">Listing 5<a class="anchorjs-link " href="#listing-5" aria-label="Anchor link for: listing 5" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-4">Source<a class="anchorjs-link " href="#source-4" aria-label="Anchor link for: source 4" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;regex&gt;
#include &lt;type_traits&gt;
</span>
<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Destructible</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_destructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">DefaultConstructible</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_default_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Movable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Copyable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Semiregular</span> <span class="o">=</span> <span class="n">Copyable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">DefaultConstructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">EqualityComparable</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">==</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span>
   <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">!=</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Regular</span> <span class="o">=</span> <span class="n">Semiregular</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">EqualityComparable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">std</span><span class="o">::</span><span class="n">enable_if_t</span><span class="o">&lt;</span><span class="n">Regular</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">regex</span><span class="o">&gt;</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">regex</span><span class="o">&gt;</span> <span class="n">foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-4">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-4" aria-label="Anchor link for: gcc diagnostic 4" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>&lt;source&gt;: In instantiation of 'constexpr const bool EqualityComparable&lt;std::__cxx11::basic_regex&lt;char&gt; &gt;':
24 : &lt;source&gt;:24:44:   required from 'constexpr const bool Regular&lt;std::__cxx11::basic_regex&lt;char&gt; &gt;'
28 : &lt;source&gt;:28:20:   required from here
20 : &lt;source&gt;:20:79: error: no match for 'operator==' (operand types are 'std::__cxx11::basic_regex&lt;char&gt;' and 'std::__cxx11::basic_regex&lt;char&gt;')
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:56:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/std_function.h:770:5: note: candidate: template&lt;class _Res, class ... _Args&gt; bool std::operator==(std::nullptr_t, const std::function&lt;_Res(_ArgTypes ...)&gt;&amp;)
     operator==(nullptr_t, const function&lt;_Res(_Args...)&gt;&amp; __f) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/std_function.h:770:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::function&lt;_Res(_ArgTypes ...)&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:56:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/std_function.h:764:5: note: candidate: template&lt;class _Res, class ... _Args&gt; bool std::operator==(const std::function&lt;_Res(_ArgTypes ...)&gt;&amp;, std::nullptr_t)
     operator==(const function&lt;_Res(_Args...)&gt;&amp; __f, nullptr_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/std_function.h:764:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::function&lt;_Res(_ArgTypes ...)&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:62:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_multimap.h:1045:5: note: candidate: template&lt;class _Key, class _Tp, class _Compare, class _Alloc&gt; bool std::operator==(const std::multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;, const std::multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;)
     operator==(const multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_multimap.h:1045:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:61:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_map.h:1380:5: note: candidate: template&lt;class _Key, class _Tp, class _Compare, class _Alloc&gt; bool std::operator==(const std::map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;, const std::map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;)
     operator==(const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_map.h:1380:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::map&lt;_Key, _Tp, _Compare, _Alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:1533:5: note: candidate: template&lt;class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc&gt; bool std::operator==(const std::_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;, const std::_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;)
     operator==(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:1533:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:406:5: note: candidate: template&lt;class _Val&gt; bool std::operator==(const std::_Rb_tree_iterator&lt;_Tp&gt;&amp;, const std::_Rb_tree_const_iterator&lt;_Val&gt;&amp;)
     operator==(const _Rb_tree_iterator&lt;_Val&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:406:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::_Rb_tree_iterator&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:908:5: note: candidate: template&lt;class _Tp, class _Up&gt; constexpr std::__optional_relop_t&lt;decltype ((declval&lt;_Up&gt;() == declval&lt;_Tp&gt;()))&gt; std::operator==(const _Up&amp;, const std::optional&lt;_Tp&gt;&amp;)
     operator==(const _Up&amp; __lhs, const optional&lt;_Tp&gt;&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:908:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:902:5: note: candidate: template&lt;class _Tp, class _Up&gt; constexpr std::__optional_relop_t&lt;decltype ((declval&lt;_Tp&gt;() == declval&lt;_Up&gt;()))&gt; std::operator==(const std::optional&lt;_Tp&gt;&amp;, const _Up&amp;)
     operator==(const optional&lt;_Tp&gt;&amp; __lhs, const _Up&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:902:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:846:5: note: candidate: template&lt;class _Tp&gt; constexpr bool std::operator==(std::nullopt_t, const std::optional&lt;_Tp&gt;&amp;)
     operator==(nullopt_t, const optional&lt;_Tp&gt;&amp; __rhs) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:846:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:841:5: note: candidate: template&lt;class _Tp&gt; constexpr bool std::operator==(const std::optional&lt;_Tp&gt;&amp;, std::nullopt_t)
     operator==(const optional&lt;_Tp&gt;&amp; __lhs, nullopt_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:841:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:790:5: note: candidate: template&lt;class _Tp, class _Up&gt; constexpr std::__optional_relop_t&lt;decltype ((declval&lt;_Tp&gt;() == declval&lt;_Up&gt;()))&gt; std::operator==(const std::optional&lt;_Tp&gt;&amp;, const std::optional&lt;_Up&gt;&amp;)
     operator==(const optional&lt;_Tp&gt;&amp; __lhs, const optional&lt;_Up&gt;&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:790:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/vector:64:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:51,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_vector.h:1596:5: note: candidate: template&lt;class _Tp, class _Alloc&gt; bool std::operator==(const std::vector&lt;_Tp, _Alloc&gt;&amp;, const std::vector&lt;_Tp, _Alloc&gt;&amp;)
     operator==(const vector&lt;_Tp, _Alloc&gt;&amp; __x, const vector&lt;_Tp, _Alloc&gt;&amp; __y)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_vector.h:1596:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::vector&lt;_Tp, _Alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/stack:61:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:47,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_stack.h:293:5: note: candidate: template&lt;class _Tp, class _Seq&gt; bool std::operator==(const std::stack&lt;_Tp, _Seq&gt;&amp;, const std::stack&lt;_Tp, _Seq&gt;&amp;)
     operator==(const stack&lt;_Tp, _Seq&gt;&amp; __x, const stack&lt;_Tp, _Seq&gt;&amp; __y)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_stack.h:293:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::stack&lt;_Tp, _Seq&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/deque:64:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/stack:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:47,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:2258:5: note: candidate: template&lt;class _Tp, class _Alloc&gt; bool std::operator==(const std::deque&lt;_Tp, _Alloc&gt;&amp;, const std::deque&lt;_Tp, _Alloc&gt;&amp;)
     operator==(const deque&lt;_Tp, _Alloc&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:2258:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::deque&lt;_Tp, _Alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/deque:64:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/stack:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:47,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:274:5: note: candidate: template&lt;class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR&gt; bool std::operator==(const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;&amp;, const std::_Deque_iterator&lt;_Tp, _RefR, _PtrR&gt;&amp;)
     operator==(const _Deque_iterator&lt;_Tp, _RefL, _PtrL&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:274:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/deque:64:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/stack:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:47,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:267:5: note: candidate: template&lt;class _Tp, class _Ref, class _Ptr&gt; bool std::operator==(const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;&amp;, const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;&amp;)
     operator==(const _Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:267:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:378:5: note: candidate: template&lt;class _Tp&gt; bool std::operator==(std::nullptr_t, const std::shared_ptr&lt;_Tp&gt;&amp;)
     operator==(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __a) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:378:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::shared_ptr&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:373:5: note: candidate: template&lt;class _Tp&gt; bool std::operator==(const std::shared_ptr&lt;_Tp&gt;&amp;, std::nullptr_t)
     operator==(const shared_ptr&lt;_Tp&gt;&amp; __a, nullptr_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:373:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::shared_ptr&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:368:5: note: candidate: template&lt;class _Tp, class _Up&gt; bool std::operator==(const std::shared_ptr&lt;_Tp&gt;&amp;, const std::shared_ptr&lt;_Up&gt;&amp;)
     operator==(const shared_ptr&lt;_Tp&gt;&amp; __a, const shared_ptr&lt;_Up&gt;&amp; __b) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:368:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::shared_ptr&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1420:5: note: candidate: template&lt;class _Tp, __gnu_cxx::_Lock_policy _Lp&gt; bool std::operator==(std::nullptr_t, const std::__shared_ptr&lt;_Tp, _Lp&gt;&amp;)
     operator==(nullptr_t, const __shared_ptr&lt;_Tp, _Lp&gt;&amp; __a) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1420:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__shared_ptr&lt;_Tp, _Lp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1415:5: note: candidate: template&lt;class _Tp, __gnu_cxx::_Lock_policy _Lp&gt; bool std::operator==(const std::__shared_ptr&lt;_Tp, _Lp&gt;&amp;, std::nullptr_t)
     operator==(const __shared_ptr&lt;_Tp, _Lp&gt;&amp; __a, nullptr_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1415:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__shared_ptr&lt;_Tp, _Lp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1409:5: note: candidate: template&lt;class _Tp1, class _Tp2, __gnu_cxx::_Lock_policy _Lp&gt; bool std::operator==(const std::__shared_ptr&lt;_Tp1, _Lp&gt;&amp;, const std::__shared_ptr&lt;_Tp2, _Lp&gt;&amp;)
     operator==(const __shared_ptr&lt;_Tp1, _Lp&gt;&amp; __a,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1409:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__shared_ptr&lt;_Tp1, _Lp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:694:5: note: candidate: template&lt;class _Tp, class _Dp&gt; bool std::operator==(std::nullptr_t, const std::unique_ptr&lt;_Tp, _Dp&gt;&amp;)
     operator==(nullptr_t, const unique_ptr&lt;_Tp, _Dp&gt;&amp; __x) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:694:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::unique_ptr&lt;_Tp, _Dp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:689:5: note: candidate: template&lt;class _Tp, class _Dp&gt; bool std::operator==(const std::unique_ptr&lt;_Tp, _Dp&gt;&amp;, std::nullptr_t)
     operator==(const unique_ptr&lt;_Tp, _Dp&gt;&amp; __x, nullptr_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:689:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::unique_ptr&lt;_Tp, _Dp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:683:5: note: candidate: template&lt;class _Tp, class _Dp, class _Up, class _Ep&gt; bool std::operator==(const std::unique_ptr&lt;_Tp, _Dp&gt;&amp;, const std::unique_ptr&lt;_Up, _Ep&gt;&amp;)
     operator==(const unique_ptr&lt;_Tp, _Dp&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:683:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::unique_ptr&lt;_Tp, _Dp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:37:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/tuple:1397:5: note: candidate: template&lt;class ... _TElements, class ... _UElements&gt; constexpr bool std::operator==(const std::tuple&lt;_Tps ...&gt;&amp;, const std::tuple&lt;_Elements ...&gt;&amp;)
     operator==(const tuple&lt;_TElements...&gt;&amp; __t,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/tuple:1397:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::tuple&lt;_Tps ...&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/tuple:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:37,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/array:252:5: note: candidate: template&lt;class _Tp, long unsigned int _Nm&gt; bool std::operator==(const std::array&lt;_Tp, _Nm&gt;&amp;, const std::array&lt;_Tp, _Nm&gt;&amp;)
     operator==(const array&lt;_Tp, _Nm&gt;&amp; __one, const array&lt;_Tp, _Nm&gt;&amp; __two)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/array:252:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::array&lt;_Tp, _Nm&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/iterator:66:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:43,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stream_iterator.h:130:5: note: candidate: template&lt;class _Tp, class _CharT, class _Traits, class _Dist&gt; bool std::operator==(const std::istream_iterator&lt;_Tp, _CharT, _Traits, _Dist&gt;&amp;, const std::istream_iterator&lt;_Tp, _CharT, _Traits, _Dist&gt;&amp;)
     operator==(const istream_iterator&lt;_Tp, _CharT, _Traits, _Dist&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stream_iterator.h:130:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::istream_iterator&lt;_Tp, _CharT, _Traits, _Dist&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_facets.h:48:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_ios.h:37,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/ios:44,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/ostream:38,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/iterator:64,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:43,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/streambuf_iterator.h:204:5: note: candidate: template&lt;class _CharT, class _Traits&gt; bool std::operator==(const std::istreambuf_iterator&lt;_CharT, _Traits&gt;&amp;, const std::istreambuf_iterator&lt;_CharT, _Traits&gt;&amp;)
     operator==(const istreambuf_iterator&lt;_CharT, _Traits&gt;&amp; __a,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/streambuf_iterator.h:204:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::istreambuf_iterator&lt;_CharT, _Traits&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/ios_base.h:46:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/ios:42,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/ostream:38,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/iterator:64,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:43,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:311:3: note: candidate: bool std::operator==(const std::error_condition&amp;, const std::error_condition&amp;)
   operator==(const error_condition&amp; __lhs,
   ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:311:3: note:   no known conversion for argument 1 from 'std::__cxx11::basic_regex&lt;char&gt;' to 'const std::error_condition&amp;'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:304:3: note: candidate: bool std::operator==(const std::error_condition&amp;, const std::error_code&amp;)
   operator==(const error_condition&amp; __lhs, const error_code&amp; __rhs) noexcept
   ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:304:3: note:   no known conversion for argument 1 from 'std::__cxx11::basic_regex&lt;char&gt;' to 'const std::error_condition&amp;'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:297:3: note: candidate: bool std::operator==(const std::error_code&amp;, const std::error_condition&amp;)
   operator==(const error_code&amp; __lhs, const error_condition&amp; __rhs) noexcept
   ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:297:3: note:   no known conversion for argument 1 from 'std::__cxx11::basic_regex&lt;char&gt;' to 'const std::error_code&amp;'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:292:3: note: candidate: bool std::operator==(const std::error_code&amp;, const std::error_code&amp;)
   operator==(const error_code&amp; __lhs, const error_code&amp; __rhs) noexcept
   ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:292:3: note:   no known conversion for argument 1 from 'std::__cxx11::basic_regex&lt;char&gt;' to 'const std::error_code&amp;'
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5841:5: note: candidate: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator==(const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;, const _CharT*)
     operator==(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5841:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5829:5: note: candidate: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator==(const _CharT*, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;)
     operator==(const _CharT* __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5829:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   mismatched types 'const _CharT*' and 'std::__cxx11::basic_regex&lt;char&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5815:5: note: candidate: template&lt;class _CharT&gt; typename __gnu_cxx::__enable_if&lt;std::__is_char&lt;_Tp&gt;::__value, bool&gt;::__type std::operator==(const std::__cxx11::basic_string&lt;_CharT&gt;&amp;, const std::__cxx11::basic_string&lt;_CharT&gt;&amp;)
     operator==(const basic_string&lt;_CharT&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5815:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::basic_string&lt;_CharT&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5807:5: note: candidate: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator==(const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;)
     operator==(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5807:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:48:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:461:5: note: candidate: template&lt;class _CharT, class _Traits&gt; bool std::operator==(std::__detail::__idt&lt;std::basic_string_view&lt;_CharT, _Traits&gt; &gt;, std::basic_string_view&lt;_CharT, _Traits&gt;)
     operator==(__detail::__idt&lt;basic_string_view&lt;_CharT, _Traits&gt;&gt; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:461:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'std::basic_string_view&lt;_CharT, _Traits&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:48:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:455:5: note: candidate: template&lt;class _CharT, class _Traits&gt; bool std::operator==(std::basic_string_view&lt;_CharT, _Traits&gt;, std::__detail::__idt&lt;std::basic_string_view&lt;_CharT, _Traits&gt; &gt;)
     operator==(basic_string_view&lt;_CharT, _Traits&gt; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:455:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'std::basic_string_view&lt;_CharT, _Traits&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:48:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:449:5: note: candidate: template&lt;class _CharT, class _Traits&gt; bool std::operator==(std::basic_string_view&lt;_CharT, _Traits&gt;, std::basic_string_view&lt;_CharT, _Traits&gt;)
     operator==(basic_string_view&lt;_CharT, _Traits&gt; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:449:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'std::basic_string_view&lt;_CharT, _Traits&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/allocator.h:152:5: note: candidate: template&lt;class _Tp&gt; bool std::operator==(const std::allocator&lt;_Tp&gt;&amp;, const std::allocator&lt;_Tp&gt;&amp;)
     operator==(const allocator&lt;_Tp&gt;&amp;, const allocator&lt;_Tp&gt;&amp;)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/allocator.h:152:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::allocator&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/allocator.h:146:5: note: candidate: template&lt;class _T1, class _T2&gt; bool std::operator==(const std::allocator&lt;_Tp&gt;&amp;, const std::allocator&lt;_Tp&gt;&amp;)
     operator==(const allocator&lt;_T1&gt;&amp;, const allocator&lt;_T2&gt;&amp;)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/allocator.h:146:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::allocator&lt;_Tp&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/char_traits.h:40:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:40,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/postypes.h:216:5: note: candidate: template&lt;class _StateT&gt; bool std::operator==(const std::fpos&lt;_StateT&gt;&amp;, const std::fpos&lt;_StateT&gt;&amp;)
     operator==(const fpos&lt;_StateT&gt;&amp; __lhs, const fpos&lt;_StateT&gt;&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/postypes.h:216:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::fpos&lt;_StateT&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1124:5: note: candidate: template&lt;class _Iterator&gt; constexpr bool std::operator==(const std::move_iterator&lt;_IteratorL&gt;&amp;, const std::move_iterator&lt;_IteratorL&gt;&amp;)
     operator==(const move_iterator&lt;_Iterator&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1124:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::move_iterator&lt;_IteratorL&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1118:5: note: candidate: template&lt;class _IteratorL, class _IteratorR&gt; constexpr bool std::operator==(const std::move_iterator&lt;_IteratorL&gt;&amp;, const std::move_iterator&lt;_IteratorR&gt;&amp;)
     operator==(const move_iterator&lt;_IteratorL&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1118:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::move_iterator&lt;_IteratorL&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:337:5: note: candidate: template&lt;class _IteratorL, class _IteratorR&gt; constexpr bool std::operator==(const std::reverse_iterator&lt;_Iterator&gt;&amp;, const std::reverse_iterator&lt;_IteratorR&gt;&amp;)
     operator==(const reverse_iterator&lt;_IteratorL&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:337:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::reverse_iterator&lt;_Iterator&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:299:5: note: candidate: template&lt;class _Iterator&gt; constexpr bool std::operator==(const std::reverse_iterator&lt;_Iterator&gt;&amp;, const std::reverse_iterator&lt;_Iterator&gt;&amp;)
     operator==(const reverse_iterator&lt;_Iterator&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:299:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::reverse_iterator&lt;_Iterator&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/utility:70:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_pair.h:443:5: note: candidate: template&lt;class _T1, class _T2&gt; constexpr bool std::operator==(const std::pair&lt;_T1, _T2&gt;&amp;, const std::pair&lt;_T1, _T2&gt;&amp;)
     operator==(const pair&lt;_T1, _T2&gt;&amp; __x, const pair&lt;_T1, _T2&gt;&amp; __y)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_pair.h:443:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::pair&lt;_T1, _T2&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1922:5: note: candidate: template&lt;class _Bi_iter, class _Alloc&gt; bool std::__cxx11::operator==(const std::__cxx11::match_results&lt;_BiIter, _Alloc&gt;&amp;, const std::__cxx11::match_results&lt;_BiIter, _Alloc&gt;&amp;)
     operator==(const match_results&lt;_Bi_iter, _Alloc&gt;&amp; __m1,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1922:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::match_results&lt;_BiIter, _Alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1403:5: note: candidate: template&lt;class _Bi_iter&gt; bool std::__cxx11::operator==(const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;, const typename std::iterator_traits&lt;_Iter&gt;::value_type&amp;)
     operator==(const sub_match&lt;_Bi_iter&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1403:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1323:5: note: candidate: template&lt;class _Bi_iter&gt; bool std::__cxx11::operator==(const typename std::iterator_traits&lt;_Iter&gt;::value_type&amp;, const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;)
     operator==(typename iterator_traits&lt;_Bi_iter&gt;::value_type const&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1323:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1249:5: note: candidate: template&lt;class _Bi_iter&gt; bool std::__cxx11::operator==(const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;, const typename std::iterator_traits&lt;_Iter&gt;::value_type*)
     operator==(const sub_match&lt;_Bi_iter&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1249:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1175:5: note: candidate: template&lt;class _Bi_iter&gt; bool std::__cxx11::operator==(const typename std::iterator_traits&lt;_Iter&gt;::value_type*, const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;)
     operator==(typename iterator_traits&lt;_Bi_iter&gt;::value_type const* __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1175:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1095:5: note: candidate: template&lt;class _Bi_iter, class _Ch_traits, class _Ch_alloc&gt; bool std::__cxx11::operator==(const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;, std::__cxx11::__sub_match_string&lt;_Bi_iter, _Ch_traits, _Ch_alloc&gt;&amp;)
     operator==(const sub_match&lt;_Bi_iter&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1095:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1015:5: note: candidate: template&lt;class _Bi_iter, class _Ch_traits, class _Ch_alloc&gt; bool std::__cxx11::operator==(std::__cxx11::__sub_match_string&lt;_Bi_iter, _Ch_traits, _Ch_alloc&gt;&amp;, const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;)
     operator==(const __sub_match_string&lt;_Bi_iter, _Ch_traits, _Ch_alloc&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1015:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'std::__cxx11::__sub_match_string&lt;_Bi_iter, _Ch_traits, _Ch_alloc&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:942:5: note: candidate: template&lt;class _BiIter&gt; bool std::__cxx11::operator==(const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;, const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;)
     operator==(const sub_match&lt;_BiIter&gt;&amp; __lhs, const sub_match&lt;_BiIter&gt;&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:942:5: note:   template argument deduction/substitution failed:
20 : &lt;source&gt;:20:79: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
 constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
21 : &lt;source&gt;:21:46: error: no match for 'operator!=' (operand types are 'std::__cxx11::basic_regex&lt;char&gt;' and 'std::__cxx11::basic_regex&lt;char&gt;')
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:56:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/std_function.h:788:5: note: candidate: template&lt;class _Res, class ... _Args&gt; bool std::operator!=(std::nullptr_t, const std::function&lt;_Res(_ArgTypes ...)&gt;&amp;)
     operator!=(nullptr_t, const function&lt;_Res(_Args...)&gt;&amp; __f) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/std_function.h:788:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::function&lt;_Res(_ArgTypes ...)&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:56:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/std_function.h:782:5: note: candidate: template&lt;class _Res, class ... _Args&gt; bool std::operator!=(const std::function&lt;_Res(_ArgTypes ...)&gt;&amp;, std::nullptr_t)
     operator!=(const function&lt;_Res(_Args...)&gt;&amp; __f, nullptr_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/std_function.h:782:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::function&lt;_Res(_ArgTypes ...)&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:62:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_multimap.h:1069:5: note: candidate: template&lt;class _Key, class _Tp, class _Compare, class _Alloc&gt; bool std::operator!=(const std::multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;, const std::multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;)
     operator!=(const multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_multimap.h:1069:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::multimap&lt;_Key, _Tp, _Compare, _Alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:61:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_map.h:1404:5: note: candidate: template&lt;class _Key, class _Tp, class _Compare, class _Alloc&gt; bool std::operator!=(const std::map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;, const std::map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;)
     operator!=(const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_map.h:1404:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::map&lt;_Key, _Tp, _Compare, _Alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:1553:5: note: candidate: template&lt;class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc&gt; bool std::operator!=(const std::_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;, const std::_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;)
     operator!=(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:1553:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:412:5: note: candidate: template&lt;class _Val&gt; bool std::operator!=(const std::_Rb_tree_iterator&lt;_Tp&gt;&amp;, const std::_Rb_tree_const_iterator&lt;_Val&gt;&amp;)
     operator!=(const _Rb_tree_iterator&lt;_Val&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:412:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::_Rb_tree_iterator&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:920:5: note: candidate: template&lt;class _Tp, class _Up&gt; constexpr std::__optional_relop_t&lt;decltype ((declval&lt;_Up&gt;() != declval&lt;_Tp&gt;()))&gt; std::operator!=(const _Up&amp;, const std::optional&lt;_Tp&gt;&amp;)
     operator!=(const _Up&amp; __lhs, const optional&lt;_Tp&gt;&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:920:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:914:5: note: candidate: template&lt;class _Tp, class _Up&gt; constexpr std::__optional_relop_t&lt;decltype ((declval&lt;_Tp&gt;() != declval&lt;_Up&gt;()))&gt; std::operator!=(const std::optional&lt;_Tp&gt;&amp;, const _Up&amp;)
     operator!=(const optional&lt;_Tp&gt;&amp; __lhs, const _Up&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:914:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:856:5: note: candidate: template&lt;class _Tp&gt; constexpr bool std::operator!=(std::nullopt_t, const std::optional&lt;_Tp&gt;&amp;)
     operator!=(nullopt_t, const optional&lt;_Tp&gt;&amp; __rhs) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:856:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:851:5: note: candidate: template&lt;class _Tp&gt; constexpr bool std::operator!=(const std::optional&lt;_Tp&gt;&amp;, std::nullopt_t)
     operator!=(const optional&lt;_Tp&gt;&amp; __lhs, nullopt_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:851:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/node_handle.h:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_tree.h:72,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/map:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:52,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:799:5: note: candidate: template&lt;class _Tp, class _Up&gt; constexpr std::__optional_relop_t&lt;decltype ((declval&lt;_Tp&gt;() != declval&lt;_Up&gt;()))&gt; std::operator!=(const std::optional&lt;_Tp&gt;&amp;, const std::optional&lt;_Up&gt;&amp;)
     operator!=(const optional&lt;_Tp&gt;&amp; __lhs, const optional&lt;_Up&gt;&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/optional:799:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::optional&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/vector:64:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:51,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_vector.h:1620:5: note: candidate: template&lt;class _Tp, class _Alloc&gt; bool std::operator!=(const std::vector&lt;_Tp, _Alloc&gt;&amp;, const std::vector&lt;_Tp, _Alloc&gt;&amp;)
     operator!=(const vector&lt;_Tp, _Alloc&gt;&amp; __x, const vector&lt;_Tp, _Alloc&gt;&amp; __y)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_vector.h:1620:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::vector&lt;_Tp, _Alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/stack:61:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:47,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_stack.h:317:5: note: candidate: template&lt;class _Tp, class _Seq&gt; bool std::operator!=(const std::stack&lt;_Tp, _Seq&gt;&amp;, const std::stack&lt;_Tp, _Seq&gt;&amp;)
     operator!=(const stack&lt;_Tp, _Seq&gt;&amp; __x, const stack&lt;_Tp, _Seq&gt;&amp; __y)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_stack.h:317:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::stack&lt;_Tp, _Seq&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/deque:64:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/stack:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:47,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:2284:5: note: candidate: template&lt;class _Tp, class _Alloc&gt; bool std::operator!=(const std::deque&lt;_Tp, _Alloc&gt;&amp;, const std::deque&lt;_Tp, _Alloc&gt;&amp;)
     operator!=(const deque&lt;_Tp, _Alloc&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:2284:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::deque&lt;_Tp, _Alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/deque:64:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/stack:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:47,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:287:5: note: candidate: template&lt;class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR&gt; bool std::operator!=(const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;&amp;, const std::_Deque_iterator&lt;_Tp, _RefR, _PtrR&gt;&amp;)
     operator!=(const _Deque_iterator&lt;_Tp, _RefL, _PtrL&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:287:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/deque:64:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/stack:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:47,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:280:5: note: candidate: template&lt;class _Tp, class _Ref, class _Ptr&gt; bool std::operator!=(const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;&amp;, const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;&amp;)
     operator!=(const _Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_deque.h:280:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::_Deque_iterator&lt;_Tp, _Ref, _Ptr&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:393:5: note: candidate: template&lt;class _Tp&gt; bool std::operator!=(std::nullptr_t, const std::shared_ptr&lt;_Tp&gt;&amp;)
     operator!=(nullptr_t, const shared_ptr&lt;_Tp&gt;&amp; __a) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:393:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::shared_ptr&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:388:5: note: candidate: template&lt;class _Tp&gt; bool std::operator!=(const std::shared_ptr&lt;_Tp&gt;&amp;, std::nullptr_t)
     operator!=(const shared_ptr&lt;_Tp&gt;&amp; __a, nullptr_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:388:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::shared_ptr&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:383:5: note: candidate: template&lt;class _Tp, class _Up&gt; bool std::operator!=(const std::shared_ptr&lt;_Tp&gt;&amp;, const std::shared_ptr&lt;_Up&gt;&amp;)
     operator!=(const shared_ptr&lt;_Tp&gt;&amp; __a, const shared_ptr&lt;_Up&gt;&amp; __b) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:383:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::shared_ptr&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1436:5: note: candidate: template&lt;class _Tp, __gnu_cxx::_Lock_policy _Lp&gt; bool std::operator!=(std::nullptr_t, const std::__shared_ptr&lt;_Tp, _Lp&gt;&amp;)
     operator!=(nullptr_t, const __shared_ptr&lt;_Tp, _Lp&gt;&amp; __a) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1436:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__shared_ptr&lt;_Tp, _Lp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1431:5: note: candidate: template&lt;class _Tp, __gnu_cxx::_Lock_policy _Lp&gt; bool std::operator!=(const std::__shared_ptr&lt;_Tp, _Lp&gt;&amp;, std::nullptr_t)
     operator!=(const __shared_ptr&lt;_Tp, _Lp&gt;&amp; __a, nullptr_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1431:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__shared_ptr&lt;_Tp, _Lp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr.h:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/memory:81,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:45,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1425:5: note: candidate: template&lt;class _Tp1, class _Tp2, __gnu_cxx::_Lock_policy _Lp&gt; bool std::operator!=(const std::__shared_ptr&lt;_Tp1, _Lp&gt;&amp;, const std::__shared_ptr&lt;_Tp2, _Lp&gt;&amp;)
     operator!=(const __shared_ptr&lt;_Tp1, _Lp&gt;&amp; __a,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/shared_ptr_base.h:1425:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__shared_ptr&lt;_Tp1, _Lp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:711:5: note: candidate: template&lt;class _Tp, class _Dp&gt; bool std::operator!=(std::nullptr_t, const std::unique_ptr&lt;_Tp, _Dp&gt;&amp;)
     operator!=(nullptr_t, const unique_ptr&lt;_Tp, _Dp&gt;&amp; __x) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:711:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::unique_ptr&lt;_Tp, _Dp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:706:5: note: candidate: template&lt;class _Tp, class _Dp&gt; bool std::operator!=(const std::unique_ptr&lt;_Tp, _Dp&gt;&amp;, std::nullptr_t)
     operator!=(const unique_ptr&lt;_Tp, _Dp&gt;&amp; __x, nullptr_t) noexcept
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:706:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::unique_ptr&lt;_Tp, _Dp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:700:5: note: candidate: template&lt;class _Tp, class _Dp, class _Up, class _Ep&gt; bool std::operator!=(const std::unique_ptr&lt;_Tp, _Dp&gt;&amp;, const std::unique_ptr&lt;_Up, _Ep&gt;&amp;)
     operator!=(const unique_ptr&lt;_Tp, _Dp&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:700:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::unique_ptr&lt;_Tp, _Dp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:37:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/tuple:1423:5: note: candidate: template&lt;class ... _TElements, class ... _UElements&gt; constexpr bool std::operator!=(const std::tuple&lt;_Tps ...&gt;&amp;, const std::tuple&lt;_Elements ...&gt;&amp;)
     operator!=(const tuple&lt;_TElements...&gt;&amp; __t,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/tuple:1423:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::tuple&lt;_Tps ...&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/tuple:39:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/unique_ptr.h:37,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_conv.h:41,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/locale:43,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:44,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/array:257:5: note: candidate: template&lt;class _Tp, long unsigned int _Nm&gt; bool std::operator!=(const std::array&lt;_Tp, _Nm&gt;&amp;, const std::array&lt;_Tp, _Nm&gt;&amp;)
     operator!=(const array&lt;_Tp, _Nm&gt;&amp; __one, const array&lt;_Tp, _Nm&gt;&amp; __two)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/array:257:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::array&lt;_Tp, _Nm&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/iterator:66:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:43,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stream_iterator.h:137:5: note: candidate: template&lt;class _Tp, class _CharT, class _Traits, class _Dist&gt; bool std::operator!=(const std::istream_iterator&lt;_Tp, _CharT, _Traits, _Dist&gt;&amp;, const std::istream_iterator&lt;_Tp, _CharT, _Traits, _Dist&gt;&amp;)
     operator!=(const istream_iterator&lt;_Tp, _CharT, _Traits, _Dist&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stream_iterator.h:137:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::istream_iterator&lt;_Tp, _CharT, _Traits, _Dist&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/locale_facets.h:48:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_ios.h:37,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/ios:44,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/ostream:38,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/iterator:64,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:43,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/streambuf_iterator.h:210:5: note: candidate: template&lt;class _CharT, class _Traits&gt; bool std::operator!=(const std::istreambuf_iterator&lt;_CharT, _Traits&gt;&amp;, const std::istreambuf_iterator&lt;_CharT, _Traits&gt;&amp;)
     operator!=(const istreambuf_iterator&lt;_CharT, _Traits&gt;&amp; __a,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/streambuf_iterator.h:210:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::istreambuf_iterator&lt;_CharT, _Traits&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/ios_base.h:46:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/ios:42,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/ostream:38,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/iterator:64,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:43,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:331:3: note: candidate: bool std::operator!=(const std::error_condition&amp;, const std::error_condition&amp;)
   operator!=(const error_condition&amp; __lhs,
   ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:331:3: note:   no known conversion for argument 1 from 'std::__cxx11::basic_regex&lt;char&gt;' to 'const std::error_condition&amp;'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:327:3: note: candidate: bool std::operator!=(const std::error_condition&amp;, const std::error_code&amp;)
   operator!=(const error_condition&amp; __lhs, const error_code&amp; __rhs) noexcept
   ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:327:3: note:   no known conversion for argument 1 from 'std::__cxx11::basic_regex&lt;char&gt;' to 'const std::error_condition&amp;'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:323:3: note: candidate: bool std::operator!=(const std::error_code&amp;, const std::error_condition&amp;)
   operator!=(const error_code&amp; __lhs, const error_condition&amp; __rhs) noexcept
   ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:323:3: note:   no known conversion for argument 1 from 'std::__cxx11::basic_regex&lt;char&gt;' to 'const std::error_code&amp;'
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:319:3: note: candidate: bool std::operator!=(const std::error_code&amp;, const std::error_code&amp;)
   operator!=(const error_code&amp; __lhs, const error_code&amp; __rhs) noexcept
   ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/system_error:319:3: note:   no known conversion for argument 1 from 'std::__cxx11::basic_regex&lt;char&gt;' to 'const std::error_code&amp;'
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5879:5: note: candidate: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator!=(const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;, const _CharT*)
     operator!=(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5879:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5867:5: note: candidate: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator!=(const _CharT*, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;)
     operator!=(const _CharT* __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5867:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   mismatched types 'const _CharT*' and 'std::__cxx11::basic_regex&lt;char&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5854:5: note: candidate: template&lt;class _CharT, class _Traits, class _Alloc&gt; bool std::operator!=(const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;, const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;)
     operator!=(const basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:5854:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:48:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:479:5: note: candidate: template&lt;class _CharT, class _Traits&gt; bool std::operator!=(std::__detail::__idt&lt;std::basic_string_view&lt;_CharT, _Traits&gt; &gt;, std::basic_string_view&lt;_CharT, _Traits&gt;)
     operator!=(__detail::__idt&lt;basic_string_view&lt;_CharT, _Traits&gt;&gt; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:479:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'std::basic_string_view&lt;_CharT, _Traits&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:48:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:473:5: note: candidate: template&lt;class _CharT, class _Traits&gt; bool std::operator!=(std::basic_string_view&lt;_CharT, _Traits&gt;, std::__detail::__idt&lt;std::basic_string_view&lt;_CharT, _Traits&gt; &gt;)
     operator!=(basic_string_view&lt;_CharT, _Traits&gt; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:473:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'std::basic_string_view&lt;_CharT, _Traits&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/basic_string.h:48:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:52,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:467:5: note: candidate: template&lt;class _CharT, class _Traits&gt; bool std::operator!=(std::basic_string_view&lt;_CharT, _Traits&gt;, std::basic_string_view&lt;_CharT, _Traits&gt;)
     operator!=(basic_string_view&lt;_CharT, _Traits&gt; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string_view:467:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'std::basic_string_view&lt;_CharT, _Traits&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/allocator.h:164:5: note: candidate: template&lt;class _Tp&gt; bool std::operator!=(const std::allocator&lt;_Tp&gt;&amp;, const std::allocator&lt;_Tp&gt;&amp;)
     operator!=(const allocator&lt;_Tp&gt;&amp;, const allocator&lt;_Tp&gt;&amp;)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/allocator.h:164:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::allocator&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:41:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/allocator.h:158:5: note: candidate: template&lt;class _T1, class _T2&gt; bool std::operator!=(const std::allocator&lt;_Tp&gt;&amp;, const std::allocator&lt;_Tp&gt;&amp;)
     operator!=(const allocator&lt;_T1&gt;&amp;, const allocator&lt;_T2&gt;&amp;)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/allocator.h:158:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::allocator&lt;_Tp&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/char_traits.h:40:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/string:40,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bitset:47,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:39,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/postypes.h:221:5: note: candidate: template&lt;class _StateT&gt; bool std::operator!=(const std::fpos&lt;_StateT&gt;&amp;, const std::fpos&lt;_StateT&gt;&amp;)
     operator!=(const fpos&lt;_StateT&gt;&amp; __lhs, const fpos&lt;_StateT&gt;&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/postypes.h:221:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::fpos&lt;_StateT&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1136:5: note: candidate: template&lt;class _Iterator&gt; constexpr bool std::operator!=(const std::move_iterator&lt;_IteratorL&gt;&amp;, const std::move_iterator&lt;_IteratorL&gt;&amp;)
     operator!=(const move_iterator&lt;_Iterator&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1136:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::move_iterator&lt;_IteratorL&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1130:5: note: candidate: template&lt;class _IteratorL, class _IteratorR&gt; constexpr bool std::operator!=(const std::move_iterator&lt;_IteratorL&gt;&amp;, const std::move_iterator&lt;_IteratorR&gt;&amp;)
     operator!=(const move_iterator&lt;_IteratorL&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:1130:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::move_iterator&lt;_IteratorL&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:349:5: note: candidate: template&lt;class _IteratorL, class _IteratorR&gt; constexpr bool std::operator!=(const std::reverse_iterator&lt;_Iterator&gt;&amp;, const std::reverse_iterator&lt;_IteratorR&gt;&amp;)
     operator!=(const reverse_iterator&lt;_IteratorL&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:349:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::reverse_iterator&lt;_Iterator&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_algobase.h:67:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:61,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:311:5: note: candidate: template&lt;class _Iterator&gt; constexpr bool std::operator!=(const std::reverse_iterator&lt;_Iterator&gt;&amp;, const std::reverse_iterator&lt;_Iterator&gt;&amp;)
     operator!=(const reverse_iterator&lt;_Iterator&gt;&amp; __x,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_iterator.h:311:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::reverse_iterator&lt;_Iterator&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/utility:70:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_pair.h:456:5: note: candidate: template&lt;class _T1, class _T2&gt; constexpr bool std::operator!=(const std::pair&lt;_T1, _T2&gt;&amp;, const std::pair&lt;_T1, _T2&gt;&amp;)
     operator!=(const pair&lt;_T1, _T2&gt;&amp; __x, const pair&lt;_T1, _T2&gt;&amp; __y)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_pair.h:456:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::pair&lt;_T1, _T2&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1946:5: note: candidate: template&lt;class _Bi_iter, class _Alloc&gt; bool std::__cxx11::operator!=(const std::__cxx11::match_results&lt;_BiIter, _Alloc&gt;&amp;, const std::__cxx11::match_results&lt;_BiIter, _Alloc&gt;&amp;)
     operator!=(const match_results&lt;_Bi_iter, _Alloc&gt;&amp; __m1,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1946:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::match_results&lt;_BiIter, _Alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1419:5: note: candidate: template&lt;class _Bi_iter&gt; bool std::__cxx11::operator!=(const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;, const typename std::iterator_traits&lt;_Iter&gt;::value_type&amp;)
     operator!=(const sub_match&lt;_Bi_iter&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1419:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1339:5: note: candidate: template&lt;class _Bi_iter&gt; bool std::__cxx11::operator!=(const typename std::iterator_traits&lt;_Iter&gt;::value_type&amp;, const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;)
     operator!=(typename iterator_traits&lt;_Bi_iter&gt;::value_type const&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1339:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1262:5: note: candidate: template&lt;class _Bi_iter&gt; bool std::__cxx11::operator!=(const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;, const typename std::iterator_traits&lt;_Iter&gt;::value_type*)
     operator!=(const sub_match&lt;_Bi_iter&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1262:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1188:5: note: candidate: template&lt;class _Bi_iter&gt; bool std::__cxx11::operator!=(const typename std::iterator_traits&lt;_Iter&gt;::value_type*, const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;)
     operator!=(typename iterator_traits&lt;_Bi_iter&gt;::value_type const* __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1188:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1111:5: note: candidate: template&lt;class _Bi_iter, class _Ch_traits, class _Ch_alloc&gt; bool std::__cxx11::operator!=(const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;, std::__cxx11::__sub_match_string&lt;_Bi_iter, _Ch_traits, _Ch_alloc&gt;&amp;)
     operator!=(const sub_match&lt;_Bi_iter&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1111:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1031:5: note: candidate: template&lt;class _Bi_iter, class _Ch_traits, class _Ch_alloc&gt; bool std::__cxx11::operator!=(std::__cxx11::__sub_match_string&lt;_Bi_iter, _Ch_traits, _Ch_alloc&gt;&amp;, const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;)
     operator!=(const __sub_match_string&lt;_Bi_iter, _Ch_traits, _Ch_alloc&gt;&amp; __lhs,
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:1031:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'std::__cxx11::__sub_match_string&lt;_Bi_iter, _Ch_traits, _Ch_alloc&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:62:0,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:953:5: note: candidate: template&lt;class _BiIter&gt; bool std::__cxx11::operator!=(const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;, const std::__cxx11::sub_match&lt;_BiIter&gt;&amp;)
     operator!=(const sub_match&lt;_BiIter&gt;&amp; __lhs, const sub_match&lt;_BiIter&gt;&amp; __rhs)
     ^~~~~~~~
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/regex.h:953:5: note:   template argument deduction/substitution failed:
21 : &lt;source&gt;:21:46: note:   'std::__cxx11::basic_regex&lt;char&gt;' is not derived from 'const std::__cxx11::sub_match&lt;_BiIter&gt;'
    std::is_same_v&lt;decltype(std::declval&lt;T&gt;() != std::declval&lt;T&gt;()), bool&gt;;
                            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="clang-diagnostic-2">Clang diagnostic<a class="anchorjs-link " href="#clang-diagnostic-2" aria-label="Anchor link for: clang diagnostic 2" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>20 : &lt;source&gt;:20:79: error: invalid operands to binary expression ('std::__1::basic_regex&lt;char, std::__1::regex_traits&lt;char&gt; &gt;' and 'std::__1::basic_regex&lt;char, std::__1::regex_traits&lt;char&gt; &gt;')
constexpr bool EqualityComparable = std::is_same_v&lt;decltype(std::declval&lt;T&gt;() == std::declval&lt;T&gt;()), bool&gt; &amp;&amp;
                                                            ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~
24 : &lt;source&gt;:24:44: note: in instantiation of variable template specialization 'EqualityComparable&lt;std::__1::basic_regex&lt;char, std::__1::regex_traits&lt;char&gt; &gt; &gt;' requested here
constexpr bool Regular = Semiregular&lt;T&gt; &amp;&amp; EqualityComparable&lt;T&gt;;
                                           ^
28 : &lt;source&gt;:28:20: note: in instantiation of variable template specialization 'Regular&lt;std::__1::basic_regex&lt;char, std::__1::regex_traits&lt;char&gt; &gt; &gt;' requested here
  std::enable_if_t&lt;Regular&lt;std::regex&gt;, std::regex&gt; foo{};
                   ^
24 : &lt;source&gt;:24:44: error: constexpr variable 'Regular&lt;std::__1::basic_regex&lt;char, std::__1::regex_traits&lt;char&gt; &gt; &gt;' must be initialized by a constant expression
constexpr bool Regular = Semiregular&lt;T&gt; &amp;&amp; EqualityComparable&lt;T&gt;;
                         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
28 : &lt;source&gt;:28:20: note: in instantiation of variable template specialization 'Regular&lt;std::__1::basic_regex&lt;char, std::__1::regex_traits&lt;char&gt; &gt; &gt;' requested here
  std::enable_if_t&lt;Regular&lt;std::regex&gt;, std::regex&gt; foo{};
                   ^
28 : &lt;source&gt;:28:20: error: non-type template argument is not a constant expression
  std::enable_if_t&lt;Regular&lt;std::regex&gt;, std::regex&gt; foo{};
                   ^~~~~~~~~~~~~~~~~~~
28 : &lt;source&gt;:28:20: note: initializer of 'Regular&lt;std::__1::basic_regex&lt;char, std::__1::regex_traits&lt;char&gt; &gt; &gt;' is not a constant expression
24 : &lt;source&gt;:24:16: note: declared here
constexpr bool Regular = Semiregular&lt;T&gt; &amp;&amp; EqualityComparable&lt;T&gt;;
               ^
3 errors generated.
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="msvc-diagnostic-2">MSVC diagnostic<a class="anchorjs-link " href="#msvc-diagnostic-2" aria-label="Anchor link for: msvc diagnostic 2" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>example.cpp
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/xlocale(314): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
20 : &lt;source&gt;(20): error C2678: binary '==': no operator found which takes a left-hand operand of type 'std::regex' (or there is no acceptable conversion)
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/exception(336): note: could be 'bool std::operator ==(const std::exception_ptr &amp;,const std::exception_ptr &amp;) throw()' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/exception(341): note: or       'bool std::operator ==(std::nullptr_t,const std::exception_ptr &amp;) throw()' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/exception(346): note: or       'bool std::operator ==(const std::exception_ptr &amp;,std::nullptr_t) throw()' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/system_error(362): note: or       'bool std::operator ==(const std::error_code &amp;,const std::error_code &amp;) noexcept' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/system_error(370): note: or       'bool std::operator ==(const std::error_code &amp;,const std::error_condition &amp;) noexcept' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/system_error(378): note: or       'bool std::operator ==(const std::error_condition &amp;,const std::error_code &amp;) noexcept' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/system_error(386): note: or       'bool std::operator ==(const std::error_condition &amp;,const std::error_condition &amp;) noexcept' [found using argument-dependent lookup]
20 : &lt;source&gt;(20): note: while trying to match the argument list '(std::regex, std::regex)'
24 : &lt;source&gt;(24): note: see reference to variable template 'const bool EqualityComparable&lt;std::basic_regex&lt;char,std::regex_traits&lt;char&gt; &gt; &gt;' being compiled
28 : &lt;source&gt;(28): note: see reference to variable template 'const bool Regular&lt;std::basic_regex&lt;char,std::regex_traits&lt;char&gt; &gt; &gt;' being compiled
20 : &lt;source&gt;(20): error C2065: 'is_same_v': undeclared identifier
21 : &lt;source&gt;(21): error C2678: binary '!=': no operator found which takes a left-hand operand of type 'std::regex' (or there is no acceptable conversion)
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/exception(351): note: could be 'bool std::operator !=(const std::exception_ptr &amp;,const std::exception_ptr &amp;) throw()' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/exception(356): note: or       'bool std::operator !=(std::nullptr_t,const std::exception_ptr &amp;) throw()' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/exception(361): note: or       'bool std::operator !=(const std::exception_ptr &amp;,std::nullptr_t) throw()' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/system_error(395): note: or       'bool std::operator !=(const std::error_code &amp;,const std::error_code &amp;) noexcept' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/system_error(402): note: or       'bool std::operator !=(const std::error_code &amp;,const std::error_condition &amp;) noexcept' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/system_error(409): note: or       'bool std::operator !=(const std::error_condition &amp;,const std::error_code &amp;) noexcept' [found using argument-dependent lookup]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/system_error(416): note: or       'bool std::operator !=(const std::error_condition &amp;,const std::error_condition &amp;) noexcept' [found using argument-dependent lookup]
21 : &lt;source&gt;(21): note: while trying to match the argument list '(std::regex, std::regex)'
21 : &lt;source&gt;(21): error C2065: 'is_same_v': undeclared identifier
20 : &lt;source&gt;(20): error C2131: expression did not evaluate to a constant
20 : &lt;source&gt;(20): note: failure was caused by non-constant arguments or reference to a non-constant symbol
20 : &lt;source&gt;(20): note: see usage of 'is_same_v'
28 : &lt;source&gt;(28): error C2970: 'std::enable_if_t': template parameter '_Test': 'Regular&lt;std::regex&gt;': an expression involving objects with internal linkage cannot be used as a non-type argument
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): note: see declaration of 'std::enable_if_t'
24 : &lt;source&gt;(24): note: see declaration of 'Regular&lt;std::regex&gt;'
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): error C2039: 'type': is not a member of 'std::enable_if&lt;false,_Ty&gt;'
        with
        [
            _Ty=std::regex
        ]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): note: see declaration of 'std::enable_if&lt;false,_Ty&gt;'
        with
        [
            _Ty=std::regex
        ]
28 : &lt;source&gt;(28): note: see reference to alias template instantiation 'enable_if_t&lt;false,std::regex&gt;' being compiled
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): error C2061: syntax error: identifier 'type'
28 : &lt;source&gt;(28): error C2938: 'enable_if_t&lt;false,std::regex&gt;' : Failed to specialize alias template
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
Compiler exited with result code 2
</code></pre>
</div>

<h3 id="listing-6">Listing 6<a class="anchorjs-link " href="#listing-6" aria-label="Anchor link for: listing 6" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-5">Source<a class="anchorjs-link " href="#source-5" aria-label="Anchor link for: source 5" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;regex&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>
<span class="k">using</span> <span class="n">ranges</span><span class="o">::</span><span class="n">Regular</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">Regular</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">regex</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-5">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-5" aria-label="Anchor link for: gcc diagnostic 5" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>&lt;source&gt;: In function 'int main()':
10 : &lt;source&gt;:10:28: error: deduced initializer does not satisfy placeholder constraints
   Regular foo = std::regex{};
                            ^
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object.hpp:20:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/regular.hpp:25:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::Regular&lt;T&gt; [with T = std::__cxx11::basic_regex&lt;char&gt;]'
  concept bool Regular =
               ^~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/regular.hpp:17:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object.hpp:20,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:94:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::EqualityComparable&lt;T&gt; [with T = std::__cxx11::basic_regex&lt;char&gt;]'
  concept bool EqualityComparable =
               ^~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:74:15: note: within 'template&lt;class T, class U&gt; concept const bool std::experimental::ranges::v1::WeaklyEqualityComparable&lt;T, U&gt; [with T = std::__cxx11::basic_regex&lt;char&gt;; U = std::__cxx11::basic_regex&lt;char&gt;]'
  concept bool WeaklyEqualityComparable =
               ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:74:15: note:     with 'std::remove_reference_t&lt;std::__cxx11::basic_regex&lt;char&gt; &gt;&amp; t'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:74:15: note:     with 'std::remove_reference_t&lt;std::__cxx11::basic_regex&lt;char&gt; &gt;&amp; u'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:74:15: note: the required expression '(t == u)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:74:15: note: the required expression '(t != u)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:74:15: note: the required expression '(u == t)' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:74:15: note: the required expression '(u != t)' would be ill-formed
Compiler exited with result code 1
</code></pre>
</div>

<h3 id="listing-7">Listing 7<a class="anchorjs-link " href="#listing-7" aria-label="Anchor link for: listing 7" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-6">Source<a class="anchorjs-link " href="#source-6" aria-label="Anchor link for: source 6" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;regex&gt;
#include &lt;type_traits&gt;
</span>
<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="n">Foo</span><span class="p">()</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span> 
<span class="p">};</span>

<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">==</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">!=</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Destructible</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_destructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">DefaultConstructible</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_default_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Movable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Copyable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Semiregular</span> <span class="o">=</span> <span class="n">Copyable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">DefaultConstructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">EqualityComparable</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">==</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span>
   <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">!=</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Regular</span> <span class="o">=</span> <span class="n">Semiregular</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">EqualityComparable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">std</span><span class="o">::</span><span class="n">enable_if_t</span><span class="o">&lt;</span><span class="n">Regular</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span><span class="p">,</span> <span class="n">Foo</span><span class="o">&gt;</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-6">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-6" aria-label="Anchor link for: gcc diagnostic 6" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/move.h:54:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_pair.h:59,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/utility:70,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/type_traits: In substitution of 'template&lt;bool _Cond, class _Tp&gt; using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = Foo]':
36 : &lt;source&gt;:36:37:   required from here
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/type_traits:2479:61: error: no type named 'type' in 'struct std::enable_if&lt;false, Foo&gt;'
     using enable_if_t = typename enable_if&lt;_Cond, _Tp&gt;::type;
                                                             ^
&lt;source&gt;: In function 'int main()':
36 : &lt;source&gt;:36:49: error: cannot convert 'Foo' to 'int' in initialization
   std::enable_if_t&lt;Regular&lt;Foo&gt;, Foo&gt; foo = Foo{};
                                                 ^
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="clang-diagnostic-3">Clang diagnostic<a class="anchorjs-link " href="#clang-diagnostic-3" aria-label="Anchor link for: clang diagnostic 3" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>In file included from &lt;source&gt;:1:
In file included from /opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/regex:758:
In file included from /opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/stdexcept:46:
In file included from /opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/exception:81:
In file included from /opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/cstddef:87:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/type_traits:427:78: error: no type named 'type' in 'std::__1::enable_if&lt;false, Foo&gt;'; 'enable_if' cannot be used to disable this declaration
template &lt;bool _Bp, class _Tp = void&gt; using enable_if_t = typename enable_if&lt;_Bp, _Tp&gt;::type;
                                                                             ^~~
36 : &lt;source&gt;:36:8: note: in instantiation of template type alias 'enable_if_t' requested here
  std::enable_if_t&lt;Regular&lt;Foo&gt;, Foo&gt; foo = Foo{};
       ^
1 error generated.
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="msvc-diagnostic-3">MSVC diagnostic<a class="anchorjs-link " href="#msvc-diagnostic-3" aria-label="Anchor link for: msvc diagnostic 3" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>example.cpp
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/xlocale(314): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): error C2039: 'type': is not a member of 'std::enable_if&lt;false,_Ty&gt;'
        with
        [
            _Ty=Foo
        ]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): note: see declaration of 'std::enable_if&lt;false,_Ty&gt;'
        with
        [
            _Ty=Foo
        ]
36 : &lt;source&gt;(36): note: see reference to alias template instantiation 'enable_if_t&lt;false,Foo&gt;' being compiled
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): error C2061: syntax error: identifier 'type'
36 : &lt;source&gt;(36): error C2938: 'enable_if_t&lt;false,Foo&gt;' : Failed to specialize alias template
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
Compiler exited with result code 2
</code></pre>
</div>

<h3 id="listing-8">Listing 8<a class="anchorjs-link " href="#listing-8" aria-label="Anchor link for: listing 8" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-7">Source<a class="anchorjs-link " href="#source-7" aria-label="Anchor link for: source 7" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;regex&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>
<span class="k">using</span> <span class="n">ranges</span><span class="o">::</span><span class="n">Regular</span><span class="p">;</span>

<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="n">Foo</span><span class="p">()</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span> 
<span class="p">};</span>

<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">==</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">!=</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">Regular</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-7">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-7" aria-label="Anchor link for: gcc diagnostic 7" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>&lt;source&gt;: In function 'int main()':
18 : &lt;source&gt;:18:21: error: deduced initializer does not satisfy placeholder constraints
   Regular foo = Foo{};
                     ^
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object.hpp:20:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/regular.hpp:25:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::Regular&lt;T&gt; [with T = Foo]'
  concept bool Regular =
               ^~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/regular.hpp:18:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object.hpp:20,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/semiregular.hpp:66:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::Semiregular&lt;T&gt; [with T = Foo]'
  concept bool Semiregular =
               ^~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:21:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:97:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::DefaultConstructible&lt;T&gt; [with T = Foo]'
  concept bool DefaultConstructible =
               ^~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:82:15: note: within 'template&lt;class T, class ... Args&gt; concept const bool std::experimental::ranges::v1::Constructible&lt;T, Args ...&gt; [with T = Foo; Args = {}]'
  concept bool Constructible =
               ^~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/type_traits.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_constructible; V = {}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
&lt;source&gt;: At global scope:
13 : &lt;source&gt;:13:16: warning: inline function 'constexpr bool operator==(Foo, Foo)' used but never defined
 constexpr bool operator==(const Foo, const Foo) noexcept;
                ^~~~~~~~
14 : &lt;source&gt;:14:16: warning: inline function 'constexpr bool operator!=(Foo, Foo)' used but never defined
 constexpr bool operator!=(const Foo, const Foo) noexcept;
                ^~~~~~~~
Compiler exited with result code 1
</code></pre>
</div>

<h3 id="listing-9">Listing 9<a class="anchorjs-link " href="#listing-9" aria-label="Anchor link for: listing 9" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-8">Source<a class="anchorjs-link " href="#source-8" aria-label="Anchor link for: source 8" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;regex&gt;
#include &lt;type_traits&gt;
</span>
<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="n">Foo</span><span class="p">()</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span>
  <span class="n">Foo</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span>
<span class="p">};</span>

<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">==</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">!=</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Destructible</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_destructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">DefaultConstructible</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_default_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Movable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_move_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Copyable</span> <span class="o">=</span> <span class="n">Destructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_constructible_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">std</span><span class="o">::</span><span class="n">is_copy_assignable_v</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Semiregular</span> <span class="o">=</span> <span class="n">Copyable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">DefaultConstructible</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">EqualityComparable</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">==</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span>
   <span class="n">std</span><span class="o">::</span><span class="n">is_same_v</span><span class="o">&lt;</span><span class="k">decltype</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">!=</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()),</span> <span class="kt">bool</span><span class="o">&gt;</span><span class="p">;</span>

<span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="n">Regular</span> <span class="o">=</span> <span class="n">Semiregular</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">&amp;&amp;</span> <span class="n">EqualityComparable</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">std</span><span class="o">::</span><span class="n">enable_if_t</span><span class="o">&lt;</span><span class="n">Regular</span><span class="o">&lt;</span><span class="n">Foo</span><span class="o">&gt;</span><span class="p">,</span> <span class="n">Foo</span><span class="o">&gt;</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-8">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-8" aria-label="Anchor link for: gcc diagnostic 8" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>In file included from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/move.h:54:0,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/bits/stl_pair.h:59,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/utility:70,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/algorithm:60,
                 from /opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/regex:38,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/type_traits: In substitution of 'template&lt;bool _Cond, class _Tp&gt; using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = Foo]':
37 : &lt;source&gt;:37:37:   required from here
/opt/compiler-explorer/gcc-7.2.0/include/c++/7.2.0/type_traits:2479:61: error: no type named 'type' in 'struct std::enable_if&lt;false, Foo&gt;'
     using enable_if_t = typename enable_if&lt;_Cond, _Tp&gt;::type;
                                                             ^
&lt;source&gt;: In function 'int main()':
37 : &lt;source&gt;:37:49: error: cannot convert 'Foo' to 'int' in initialization
   std::enable_if_t&lt;Regular&lt;Foo&gt;, Foo&gt; foo = Foo{};
                                                 ^
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="clang-diagnostic-4">Clang diagnostic<a class="anchorjs-link " href="#clang-diagnostic-4" aria-label="Anchor link for: clang diagnostic 4" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>In file included from &lt;source&gt;:1:
In file included from /opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/regex:758:
In file included from /opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/stdexcept:46:
In file included from /opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/exception:81:
In file included from /opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/cstddef:87:
/opt/compiler-explorer/clang-5.0.0/bin/../include/c++/v1/type_traits:427:78: error: no type named 'type' in 'std::__1::enable_if&lt;false, Foo&gt;'; 'enable_if' cannot be used to disable this declaration
template &lt;bool _Bp, class _Tp = void&gt; using enable_if_t = typename enable_if&lt;_Bp, _Tp&gt;::type;
                                                                             ^~~
37 : &lt;source&gt;:37:8: note: in instantiation of template type alias 'enable_if_t' requested here
  std::enable_if_t&lt;Regular&lt;Foo&gt;, Foo&gt; foo = Foo{};
       ^
1 error generated.
Compiler exited with result code 1
</code></pre>
</div>

<h4 id="msvc-diagnostic-4">MSVC diagnostic<a class="anchorjs-link " href="#msvc-diagnostic-4" aria-label="Anchor link for: msvc diagnostic 4" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>example.cpp
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/xlocale(314): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): error C2039: 'type': is not a member of 'std::enable_if&lt;false,_Ty&gt;'
        with
        [
            _Ty=Foo
        ]
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): note: see declaration of 'std::enable_if&lt;false,_Ty&gt;'
        with
        [
            _Ty=Foo
        ]
37 : &lt;source&gt;(37): note: see reference to alias template instantiation 'enable_if_t&lt;false,Foo&gt;' being compiled
/opt/compiler-explorer/windows/19.10.25017/lib/native/include/type_traits(2099): error C2061: syntax error: identifier 'type'
37 : &lt;source&gt;(37): error C2938: 'enable_if_t&lt;false,Foo&gt;' : Failed to specialize alias template
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
err:msvcrt:demangle_datatype Unknown type s
Compiler exited with result code 2
</code></pre>
</div>

<h3 id="listing-10">Listing 10<a class="anchorjs-link " href="#listing-10" aria-label="Anchor link for: listing 10" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h3>

<h4 id="source-9">Source<a class="anchorjs-link " href="#source-9" aria-label="Anchor link for: source 9" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="language-cpp highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;experimental/ranges/algorithm&gt;
#include &lt;experimental/ranges/iterator&gt;
#include &lt;regex&gt;
</span>
<span class="k">namespace</span> <span class="n">ranges</span> <span class="o">=</span> <span class="n">std</span><span class="o">::</span><span class="n">experimental</span><span class="o">::</span><span class="n">ranges</span><span class="p">;</span>
<span class="k">using</span> <span class="n">ranges</span><span class="o">::</span><span class="n">Regular</span><span class="p">;</span>

<span class="k">class</span> <span class="nc">Foo</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="n">Foo</span><span class="p">()</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span>
  <span class="n">Foo</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="o">=</span> <span class="k">delete</span><span class="p">;</span>
<span class="p">};</span>

<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">==</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>
<span class="k">constexpr</span> <span class="kt">bool</span> <span class="k">operator</span><span class="o">!=</span><span class="p">(</span><span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">,</span> <span class="k">const</span> <span class="n">Foo</span><span class="o">&amp;</span><span class="p">)</span> <span class="k">noexcept</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
  <span class="n">Regular</span> <span class="n">foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">{};</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="gcc-diagnostic-9">GCC diagnostic<a class="anchorjs-link " href="#gcc-diagnostic-9" aria-label="Anchor link for: gcc diagnostic 9" data-anchorjs-icon="" style="font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: 1; font-family: anchorjs-icons; padding-left: 0.375em;"></a></h4>

<div class="highlighter-rouge"><pre class="highlight"><code>&lt;source&gt;: In function 'int main()':
19 : &lt;source&gt;:19:21: error: deduced initializer does not satisfy placeholder constraints
   Regular foo = Foo{};
                     ^
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object.hpp:20:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/regular.hpp:25:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::Regular&lt;T&gt; [with T = Foo]'
  concept bool Regular =
               ^~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/regular.hpp:18:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object.hpp:20,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/semiregular.hpp:66:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::Semiregular&lt;T&gt; [with T = Foo]'
  concept bool Semiregular =
               ^~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/semiregular.hpp:50:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::Copyable&lt;T&gt; [with T = Foo]'
  concept bool Copyable =
               ^~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/semiregular.hpp:30:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::CopyConstructible&lt;T&gt; [with T = Foo]'
  concept bool CopyConstructible =
               ^~~~~~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:21:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:112:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::MoveConstructible&lt;T&gt; [with T = Foo]'
  concept bool MoveConstructible =
               ^~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:82:15: note: within 'template&lt;class T, class ... Args&gt; concept const bool std::experimental::ranges::v1::Constructible&lt;T, Args ...&gt; [with T = Foo; Args = {Foo}]'
  concept bool Constructible =
               ^~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/type_traits.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_constructible; V = {Foo}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note: within 'template&lt;class T, class U&gt; concept const bool std::experimental::ranges::v1::ConvertibleTo&lt;T, U&gt; [with T = Foo; U = Foo]'
  concept bool ConvertibleTo =
               ^~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_convertible; V = {Foo}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:21:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:82:15: note: within 'template&lt;class T, class ... Args&gt; concept const bool std::experimental::ranges::v1::Constructible&lt;T, Args ...&gt; [with T = Foo; Args = {Foo&amp;}]'
  concept bool Constructible =
               ^~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/type_traits.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_constructible; V = {Foo&amp;}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:21:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:82:15: note: within 'template&lt;class T, class ... Args&gt; concept const bool std::experimental::ranges::v1::Constructible&lt;T, Args ...&gt; [with T = Foo; Args = {const Foo&amp;}]'
  concept bool Constructible =
               ^~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/type_traits.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_constructible; V = {const Foo&amp;}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:21:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:82:15: note: within 'template&lt;class T, class ... Args&gt; concept const bool std::experimental::ranges::v1::Constructible&lt;T, Args ...&gt; [with T = Foo; Args = {const Foo&amp;&amp;}]'
  concept bool Constructible =
               ^~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/type_traits.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_constructible; V = {const Foo&amp;&amp;}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note: within 'template&lt;class T, class U&gt; concept const bool std::experimental::ranges::v1::ConvertibleTo&lt;T, U&gt; [with T = Foo&amp;; U = Foo]'
  concept bool ConvertibleTo =
               ^~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo&amp;; T = std::is_convertible; V = {Foo}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note:     with 'Foo&amp; (&amp; t)()'
  concept bool ConvertibleTo =
               ^~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note: the required expression 'static_cast&lt;U&gt;(t())' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note: within 'template&lt;class T, class U&gt; concept const bool std::experimental::ranges::v1::ConvertibleTo&lt;T, U&gt; [with T = const Foo&amp;; U = Foo]'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = const Foo&amp;; T = std::is_convertible; V = {Foo}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note:     with 'const Foo&amp; (&amp; t)()'
  concept bool ConvertibleTo =
               ^~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note: the required expression 'static_cast&lt;U&gt;(t())' would be ill-formed
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note: within 'template&lt;class T, class U&gt; concept const bool std::experimental::ranges::v1::ConvertibleTo&lt;T, U&gt; [with T = const Foo&amp;&amp;; U = Foo]'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = const Foo&amp;&amp;; T = std::is_convertible; V = {Foo}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note:     with 'const Foo&amp;&amp; (&amp; t)()'
  concept bool ConvertibleTo =
               ^~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note: the required expression 'static_cast&lt;U&gt;(t())' would be ill-formed
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/compare.hpp:20:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/regular.hpp:17,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object.hpp:20,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:22,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/movable.hpp:28:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::Movable&lt;T&gt; [with T = Foo]'
  concept bool Movable =
               ^~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:21:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:112:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::MoveConstructible&lt;T&gt; [with T = Foo]'
  concept bool MoveConstructible =
               ^~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:82:15: note: within 'template&lt;class T, class ... Args&gt; concept const bool std::experimental::ranges::v1::Constructible&lt;T, Args ...&gt; [with T = Foo; Args = {Foo}]'
  concept bool Constructible =
               ^~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/type_traits.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_constructible; V = {Foo}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:98:15: note: within 'template&lt;class T, class U&gt; concept const bool std::experimental::ranges::v1::ConvertibleTo&lt;T, U&gt; [with T = Foo; U = Foo]'
  concept bool ConvertibleTo =
               ^~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_convertible; V = {Foo}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:108:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::Swappable&lt;T&gt; [with T = Foo]'
  concept bool Swappable =
               ^~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:108:15: note:     with 'Foo&amp; a'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:108:15: note:     with 'Foo&amp; b'
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:108:15: note: the required expression 'std::experimental::ranges::v1::{anonymous}::swap(a, b)' would be ill-formed
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:21:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:97:15: note: within 'template&lt;class T&gt; concept const bool std::experimental::ranges::v1::DefaultConstructible&lt;T&gt; [with T = Foo]'
  concept bool DefaultConstructible =
               ^~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/object/move_constructible.hpp:82:15: note: within 'template&lt;class T, class ... Args&gt; concept const bool std::experimental::ranges::v1::Constructible&lt;T, Args ...&gt; [with T = Foo; Args = {}]'
  concept bool Constructible =
               ^~~~~~~~~~~~~
In file included from /opt/compiler-explorer/libs/cmcstl2/include/stl2/type_traits.hpp:19:0,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/swap.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/tagged.hpp:19,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/algorithm/tagspec.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/stl2/algorithm.hpp:16,
                 from /opt/compiler-explorer/libs/cmcstl2/include/experimental/ranges/algorithm:12,
                 from &lt;source&gt;:1:
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: within 'template&lt;class U, template&lt;class ...&gt; class T, class ... V&gt; concept const bool std::experimental::ranges::v1::_Is&lt;U, T, V ...&gt; [with U = Foo; T = std::is_constructible; V = {}]'
  concept bool _Is = _Valid&lt;T, U, V...&gt; &amp;&amp; __bool&lt;T&lt;U, V...&gt;::value&gt;;
               ^~~
/opt/compiler-explorer/libs/cmcstl2/include/stl2/detail/concepts/core.hpp:30:15: note: 'std::experimental::ranges::v1::__bool' evaluated to false
compilation terminated due to -fmax-errors=1.
Compiler exited with result code 1
</code></pre>
</div>


      
    </div>
    <script>/**
		* AnchorJS - v4.0.0 - 2017-06-02
		* https://github.com/bryanbraun/anchorjs
		* Copyright (c) 2017 Bryan Braun; Licensed MIT
		*/
	  !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";function A(A){function e(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.class=A.hasOwnProperty("class")?A.class:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64}function t(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}function n(){if(null===document.head.querySelector("style.anchorjs")){var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(e):document.head.insertBefore(e,A),e.sheet.insertRule(" .anchorjs-link {   opacity: 0;   text-decoration: none;   -webkit-font-smoothing: antialiased;   -moz-osx-font-smoothing: grayscale; }",e.sheet.cssRules.length),e.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus  {   opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after {   content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face {   font-family: "anchorjs-icons";   src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}}this.options=A||{},this.elements=[],e(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var i,o,s,c,r,a,h,l,u,d,f,g,p=[];if(e(this.options),"touch"===(g=this.options.visible)&&(g=this.isTouchDevice()?"always":"hover"),A||(A="h2, h3, h4, h5, h6"),0===(i=t(A)).length)return this;for(n(),o=document.querySelectorAll("[id]"),s=[].map.call(o,function(A){return A.id}),r=0;r<i.length;r++)if(this.hasAnchorJSLink(i[r]))p.push(r);else{if(i[r].hasAttribute("id"))c=i[r].getAttribute("id");else if(i[r].hasAttribute("data-anchor-id"))c=i[r].getAttribute("data-anchor-id");else{u=l=this.urlify(i[r].textContent),h=0;do{void 0!==a&&(u=l+"-"+h),a=s.indexOf(u),h+=1}while(-1!==a);a=void 0,s.push(u),i[r].setAttribute("id",u),c=u}d=c.replace(/-/g," "),(f=document.createElement("a")).className="anchorjs-link "+this.options.class,f.href="#"+c,f.setAttribute("aria-label","Anchor link for: "+d),f.setAttribute("data-anchorjs-icon",this.options.icon),"always"===g&&(f.style.opacity="1"),""===this.options.icon&&(f.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(f.style.lineHeight="inherit")),"left"===this.options.placement?(f.style.position="absolute",f.style.marginLeft="-1em",f.style.paddingRight="0.5em",i[r].insertBefore(f,i[r].firstChild)):(f.style.paddingLeft="0.375em",i[r].appendChild(f))}for(r=0;r<p.length;r++)i.splice(p[r]-r,1);return this.elements=this.elements.concat(i),this},this.remove=function(A){for(var e,n,i=t(A),o=0;o<i.length;o++)(n=i[o].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[o]))&&this.elements.splice(e,1),i[o].removeChild(n));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){var t=/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\]/g;return this.options.truncate||e(this.options),A.trim().replace(/\'/gi,"").replace(t,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&(" "+A.firstChild.className+" ").indexOf(" anchorjs-link ")>-1,t=A.lastChild&&(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ")>-1;return e||t||!1}}return A});</script>
    <script>anchors.add();</script>
  

</body></html>