@@ -413,13 +413,13 @@ namespace tao
413413 return x.compare ( y ) == 0 ;
414414 }
415415
416- template < class charT , class traits >
416+ template < class charT , class traits , int = 1 > // work-around for Visual C++
417417 constexpr bool operator ==( basic_string_view< charT, traits > x, internal::identity< basic_string_view< charT, traits > > y ) noexcept
418418 {
419419 return x.compare ( y ) == 0 ;
420420 }
421421
422- template < class charT , class traits >
422+ template < class charT , class traits , int = 2 > // work-around for Visual C++
423423 constexpr bool operator ==( internal::identity< basic_string_view< charT, traits > > x, basic_string_view< charT, traits > y ) noexcept
424424 {
425425 return x.compare ( y ) == 0 ;
@@ -431,13 +431,13 @@ namespace tao
431431 return x.compare ( y ) != 0 ;
432432 }
433433
434- template < class charT , class traits >
434+ template < class charT , class traits , int = 1 > // work-around for Visual C++
435435 constexpr bool operator !=( basic_string_view< charT, traits > x, internal::identity< basic_string_view< charT, traits > > y ) noexcept
436436 {
437437 return x.compare ( y ) != 0 ;
438438 }
439439
440- template < class charT , class traits >
440+ template < class charT , class traits , int = 2 > // work-around for Visual C++
441441 constexpr bool operator !=( internal::identity< basic_string_view< charT, traits > > x, basic_string_view< charT, traits > y ) noexcept
442442 {
443443 return x.compare ( y ) != 0 ;
@@ -449,13 +449,13 @@ namespace tao
449449 return x.compare ( y ) < 0 ;
450450 }
451451
452- template < class charT , class traits >
452+ template < class charT , class traits , int = 1 > // work-around for Visual C++
453453 constexpr bool operator <( basic_string_view< charT, traits > x, internal::identity< basic_string_view< charT, traits > > y ) noexcept
454454 {
455455 return x.compare ( y ) < 0 ;
456456 }
457457
458- template < class charT , class traits >
458+ template < class charT , class traits , int = 2 > // work-around for Visual C++
459459 constexpr bool operator <( internal::identity< basic_string_view< charT, traits > > x, basic_string_view< charT, traits > y ) noexcept
460460 {
461461 return x.compare ( y ) < 0 ;
@@ -467,31 +467,30 @@ namespace tao
467467 return x.compare ( y ) > 0 ;
468468 }
469469
470- template < class charT , class traits >
470+ template < class charT , class traits , int = 1 > // work-around for Visual C++
471471 constexpr bool operator >( basic_string_view< charT, traits > x, internal::identity< basic_string_view< charT, traits > > y ) noexcept
472472 {
473473 return x.compare ( y ) > 0 ;
474474 }
475475
476- template < class charT , class traits >
476+ template < class charT , class traits , int = 2 > // work-around for Visual C++
477477 constexpr bool operator >( internal::identity< basic_string_view< charT, traits > > x, basic_string_view< charT, traits > y ) noexcept
478478 {
479479 return x.compare ( y ) > 0 ;
480480 }
481481
482- template < class charT , class traits >
483- constexpr bool operator <=( basic_string_view< charT, traits > x, basic_string_view< charT, traits > y ) noexcept
482+ template < class charT , class traits constexpr bool operator <=( basic_string_view< charT, traits > x, basic_string_view< charT, traits > y ) noexcept
484483 {
485484 return x.compare ( y ) <= 0 ;
486485 }
487486
488- template < class charT , class traits >
487+ template < class charT , class traits , int = 1 > // work-around for Visual C++
489488 constexpr bool operator <=( basic_string_view< charT, traits > x, internal::identity< basic_string_view< charT, traits > > y ) noexcept
490489 {
491490 return x.compare ( y ) <= 0 ;
492491 }
493492
494- template < class charT , class traits >
493+ template < class charT , class traits , int = 2 > // work-around for Visual C++
495494 constexpr bool operator <=( internal::identity< basic_string_view< charT, traits > > x, basic_string_view< charT, traits > y ) noexcept
496495 {
497496 return x.compare ( y ) <= 0 ;
@@ -503,13 +502,13 @@ namespace tao
503502 return x.compare ( y ) >= 0 ;
504503 }
505504
506- template < class charT , class traits >
505+ template < class charT , class traits , int = 1 > // work-around for Visual C++
507506 constexpr bool operator >=( basic_string_view< charT, traits > x, internal::identity< basic_string_view< charT, traits > > y ) noexcept
508507 {
509508 return x.compare ( y ) >= 0 ;
510509 }
511510
512- template < class charT , class traits >
511+ template < class charT , class traits , int = 2 > // work-around for Visual C++
513512 constexpr bool operator >=( internal::identity< basic_string_view< charT, traits > > x, basic_string_view< charT, traits > y ) noexcept
514513 {
515514 return x.compare ( y ) >= 0 ;
0 commit comments