Skip to content

Commit ae6d075

Browse files
authored
Add TYPE_SAFE_MSC_EMPTY_BASES to all strong_typedef operations (#159)
1 parent 2608b7e commit ae6d075

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

include/type_safe/strong_typedef.hpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ using underlying_type
129129
/// \group is_strong_typedef
130130
/// Whether a type `T` is a [ts::strong_type]()
131131
template <class T, typename = detail::void_t<>>
132-
struct TYPE_SAFE_MSC_EMPTY_BASES is_strong_typedef : std::false_type
132+
struct is_strong_typedef : std::false_type
133133
{};
134134

135135
/// \group is_strong_typedef
@@ -425,43 +425,43 @@ namespace strong_typedef_op
425425
/// \exclude
426426
#define TYPE_SAFE_DETAIL_MAKE_STRONG_TYPEDEF_OP(Name, Op) \
427427
template <class StrongTypedef> \
428-
struct Name \
428+
struct TYPE_SAFE_MSC_EMPTY_BASES Name \
429429
{}; \
430430
TYPE_SAFE_DETAIL_MAKE_OP(Op, Name, StrongTypedef) \
431431
TYPE_SAFE_DETAIL_MAKE_OP_COMPOUND(Op## =, Name) \
432432
template <class StrongTypedef, typename Other> \
433-
struct mixed_##Name \
433+
struct TYPE_SAFE_MSC_EMPTY_BASES mixed_##Name \
434434
{}; \
435435
TYPE_SAFE_DETAIL_MAKE_OP_MIXED(Op, mixed_##Name, StrongTypedef) \
436436
TYPE_SAFE_DETAIL_MAKE_OP_COMPOUND_MIXED(Op## =, mixed_##Name) \
437437
template <class StrongTypedef, typename Other> \
438-
struct mixed_##Name##_noncommutative \
438+
struct TYPE_SAFE_MSC_EMPTY_BASES mixed_##Name##_noncommutative \
439439
{}; \
440440
TYPE_SAFE_DETAIL_MAKE_OP_STRONGTYPEDEF_OTHER(Op, mixed_##Name##_noncommutative, StrongTypedef) \
441441
TYPE_SAFE_DETAIL_MAKE_OP_COMPOUND_MIXED(Op## =, mixed_##Name##_noncommutative)
442442

443443
template <class StrongTypedef>
444-
struct equality_comparison
444+
struct TYPE_SAFE_MSC_EMPTY_BASES equality_comparison
445445
{};
446446
TYPE_SAFE_DETAIL_MAKE_OP(==, equality_comparison, bool)
447447
TYPE_SAFE_DETAIL_MAKE_OP(!=, equality_comparison, bool)
448448

449449
template <class StrongTypedef, typename Other>
450-
struct mixed_equality_comparison
450+
struct TYPE_SAFE_MSC_EMPTY_BASES mixed_equality_comparison
451451
{};
452452
TYPE_SAFE_DETAIL_MAKE_OP_MIXED(==, mixed_equality_comparison, bool)
453453
TYPE_SAFE_DETAIL_MAKE_OP_MIXED(!=, mixed_equality_comparison, bool)
454454

455455
template <class StrongTypedef>
456-
struct relational_comparison
456+
struct TYPE_SAFE_MSC_EMPTY_BASES relational_comparison
457457
{};
458458
TYPE_SAFE_DETAIL_MAKE_OP(<, relational_comparison, bool)
459459
TYPE_SAFE_DETAIL_MAKE_OP(<=, relational_comparison, bool)
460460
TYPE_SAFE_DETAIL_MAKE_OP(>, relational_comparison, bool)
461461
TYPE_SAFE_DETAIL_MAKE_OP(>=, relational_comparison, bool)
462462

463463
template <class StrongTypedef, typename Other>
464-
struct mixed_relational_comparison
464+
struct TYPE_SAFE_MSC_EMPTY_BASES mixed_relational_comparison
465465
{};
466466
TYPE_SAFE_DETAIL_MAKE_OP_MIXED(<, mixed_relational_comparison, bool)
467467
TYPE_SAFE_DETAIL_MAKE_OP_MIXED(<=, mixed_relational_comparison, bool)
@@ -475,7 +475,7 @@ namespace strong_typedef_op
475475
TYPE_SAFE_DETAIL_MAKE_STRONG_TYPEDEF_OP(modulo, %)
476476

477477
template <class StrongTypedef>
478-
struct explicit_bool
478+
struct TYPE_SAFE_MSC_EMPTY_BASES explicit_bool
479479
{
480480
/// \exclude
481481
explicit constexpr operator bool() const
@@ -486,7 +486,7 @@ namespace strong_typedef_op
486486
};
487487

488488
template <class StrongTypedef>
489-
struct increment
489+
struct TYPE_SAFE_MSC_EMPTY_BASES increment
490490
{
491491
/// \exclude
492492
TYPE_SAFE_CONSTEXPR14 StrongTypedef& operator++()
@@ -506,7 +506,7 @@ namespace strong_typedef_op
506506
};
507507

508508
template <class StrongTypedef>
509-
struct decrement
509+
struct TYPE_SAFE_MSC_EMPTY_BASES decrement
510510
{
511511
/// \exclude
512512
TYPE_SAFE_CONSTEXPR14 StrongTypedef& operator--()
@@ -526,7 +526,7 @@ namespace strong_typedef_op
526526
};
527527

528528
template <class StrongTypedef>
529-
struct unary_plus
529+
struct TYPE_SAFE_MSC_EMPTY_BASES unary_plus
530530
{};
531531

532532
/// \exclude
@@ -543,7 +543,7 @@ namespace strong_typedef_op
543543
}
544544

545545
template <class StrongTypedef>
546-
struct unary_minus
546+
struct TYPE_SAFE_MSC_EMPTY_BASES unary_minus
547547
{};
548548

549549
/// \exclude
@@ -581,7 +581,7 @@ namespace strong_typedef_op
581581
{};
582582

583583
template <class StrongTypedef>
584-
struct complement
584+
struct TYPE_SAFE_MSC_EMPTY_BASES complement
585585
{};
586586

587587
/// \exclude
@@ -609,7 +609,7 @@ namespace strong_typedef_op
609609
{};
610610

611611
template <class StrongTypedef, typename IntT>
612-
struct bitshift
612+
struct TYPE_SAFE_MSC_EMPTY_BASES bitshift
613613
{};
614614
TYPE_SAFE_DETAIL_MAKE_OP_MIXED(<<, bitshift, StrongTypedef)
615615
TYPE_SAFE_DETAIL_MAKE_OP_MIXED(>>, bitshift, StrongTypedef)
@@ -618,7 +618,7 @@ namespace strong_typedef_op
618618

619619
template <class StrongTypedef, typename Result, typename ResultPtr = Result*,
620620
typename ResultConstPtr = const Result*>
621-
struct dereference
621+
struct TYPE_SAFE_MSC_EMPTY_BASES dereference
622622
{
623623
/// \exclude
624624
Result& operator*()
@@ -650,7 +650,7 @@ namespace strong_typedef_op
650650
};
651651

652652
template <class StrongTypedef, typename Result, typename Index = std::size_t>
653-
struct array_subscript
653+
struct TYPE_SAFE_MSC_EMPTY_BASES array_subscript
654654
{
655655
/// \exclude
656656
Result& operator[](const Index& i)
@@ -752,7 +752,7 @@ namespace strong_typedef_op
752752
};
753753

754754
template <class StrongTypedef>
755-
struct input_operator
755+
struct TYPE_SAFE_MSC_EMPTY_BASES input_operator
756756
{
757757
/// \exclude
758758
template <typename Char, class CharTraits>
@@ -765,7 +765,7 @@ namespace strong_typedef_op
765765
};
766766

767767
template <class StrongTypedef>
768-
struct output_operator
768+
struct TYPE_SAFE_MSC_EMPTY_BASES output_operator
769769
{
770770
/// \exclude
771771
template <typename Char, class CharTraits>

0 commit comments

Comments
 (0)