Skip to content

Commit 0251eba

Browse files
committed
Update vendor
1 parent 0c4a6de commit 0251eba

File tree

10 files changed

+608
-526
lines changed

10 files changed

+608
-526
lines changed

example/vendor/cget/pkg/foonathan__debug_assert/install/include/debug_assert.hpp

+223-229
Large diffs are not rendered by default.

example/vendor/cget/pkg/foonathan__debug_assert/install/lib/cmake/debug_assert/debug_assert-config-version.cmake

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
# The variable CVF_VERSION must be set before calling configure_file().
1010

1111

12-
set(PACKAGE_VERSION "1.3.1")
12+
set(PACKAGE_VERSION "1.3.4")
1313

1414
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
1515
set(PACKAGE_VERSION_COMPATIBLE FALSE)
1616
else()
1717

18-
if("1.3.1" MATCHES "^([0-9]+)\\.")
18+
if("1.3.4" MATCHES "^([0-9]+)\\.")
1919
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
2020
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
2121
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
2222
endif()
2323
else()
24-
set(CVF_VERSION_MAJOR "1.3.1")
24+
set(CVF_VERSION_MAJOR "1.3.4")
2525
endif()
2626

2727
if(PACKAGE_FIND_VERSION_RANGE)
@@ -53,13 +53,13 @@ endif()
5353

5454

5555
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
56-
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
56+
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "" STREQUAL "")
5757
return()
5858
endif()
5959

6060
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
61-
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
62-
math(EXPR installedBits "8 * 8")
61+
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "")
62+
math(EXPR installedBits " * 8")
6363
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
6464
set(PACKAGE_VERSION_UNSUITABLE TRUE)
6565
endif()

example/vendor/cget/pkg/foonathan__type_safe/install/include/type_safe/flag_set.hpp

+19
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ namespace detail
115115
return flag_set_impl(int_type(0));
116116
}
117117

118+
static constexpr flag_set_impl from_int(int_type intVal)
119+
{
120+
return flag_set_impl(int_type(intVal));
121+
}
122+
118123
explicit constexpr flag_set_impl(const Enum& e) : bits_(mask(e)) {}
119124
template <typename Tag2>
120125
explicit constexpr flag_set_impl(const flag_set_impl<Enum, Tag2>& other)
@@ -416,6 +421,17 @@ class flag_set
416421
static_assert(flag_set_traits<Enum>::value, "invalid enum for flag_set");
417422

418423
public:
424+
using int_type = typename detail::flag_set_impl<Enum>::int_type;
425+
426+
/// \returns a flag_set based on the given integer value.
427+
/// \requires `T` must be of the same type as `int_type`.
428+
template <typename T>
429+
static constexpr flag_set from_int(T intVal)
430+
{
431+
static_assert(std::is_same<T, int_type>::value, "invalid integer type, lossy conversion");
432+
return flag_set(intVal);
433+
}
434+
419435
//=== constructors/assignment ===//
420436
/// \effects Creates a set where all flags are set to `0`.
421437
/// \group ctor_null
@@ -609,6 +625,9 @@ class flag_set
609625
}
610626

611627
private:
628+
explicit constexpr flag_set(int_type rawvalue) noexcept : flags_(detail::flag_set_impl<Enum>::from_int(rawvalue))
629+
{}
630+
612631
detail::flag_set_impl<Enum> flags_;
613632

614633
friend detail::get_flag_set_impl;

example/vendor/cget/pkg/foonathan__type_safe/install/include/type_safe/reference.hpp

+37-9
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,20 @@ namespace detail
527527
template <typename Signature>
528528
class function_ref;
529529

530+
namespace detail
531+
{
532+
template<typename>
533+
struct function_ref_trait { using type = void; };
534+
535+
template<typename Signature>
536+
struct function_ref_trait<function_ref<Signature>>
537+
{
538+
using type = function_ref<Signature>;
539+
540+
using return_type = typename type::return_type;
541+
};
542+
} // namespace detail
543+
530544
/// A reference to a function.
531545
///
532546
/// This is a lightweight reference to a function.
@@ -549,6 +563,8 @@ template <typename Return, typename... Args>
549563
class function_ref<Return(Args...)>
550564
{
551565
public:
566+
using return_type = Return;
567+
552568
using signature = Return(Args...);
553569

554570
/// \effects Creates a reference to the function specified by the function pointer.
@@ -596,10 +612,15 @@ class function_ref<Return(Args...)>
596612
/// unless the functor is compatible with the specified signature.
597613
/// \param 1
598614
/// \exclude
599-
template <typename Functor, typename = detail::enable_function_tag<detail::matching_functor_tag,
600-
Functor, Return, Args...>>
615+
template <
616+
typename Functor,
617+
typename = detail::enable_function_tag<detail::matching_functor_tag, Functor, Return, Args...>,
618+
// This overload restricts us to not directly referencing another function_ref.
619+
typename std::enable_if<std::is_same<typename detail::function_ref_trait<Functor>::type, void>::value, int>::type = 0
620+
>
601621
explicit function_ref(Functor& f) : cb_(&invoke_functor<Functor>)
602622
{
623+
// Ref to this functor
603624
::new (storage_.get()) void*(&f);
604625
}
605626

@@ -612,13 +633,20 @@ class function_ref<Return(Args...)>
612633
/// `std::string`. If this signature than accepts a type `T` implicitly convertible to `const
613634
/// char*`, calling this will call the function taking `std::string`, converting `T ->
614635
/// std::string`, even though such a conversion would be ill-formed otherwise. \param 1 \exclude
615-
template <typename Return2, typename... Args2>
616-
explicit function_ref(
617-
const function_ref<Return2(Args2...)>& other,
618-
typename std::enable_if<detail::compatible_return_type<Return2, Return>::value, int>::type
619-
= 0)
620-
: storage_(other.storage_), cb_(other.cb_)
621-
{}
636+
template <
637+
typename Functor,
638+
// This overloading allows us to directly referencing another function_ref.
639+
typename std::enable_if<!std::is_same<typename detail::function_ref_trait<Functor>::type, void>::value, int>::type = 0,
640+
// Requires that the signature not be consistent (if it is then the copy construct should be called).
641+
typename std::enable_if<!std::is_same<typename detail::function_ref_trait<Functor>::type, function_ref>::value, int>::type = 0,
642+
// Of course, the return type and parameter types must be compatible.
643+
typename = detail::enable_function_tag<detail::matching_functor_tag, Functor, Return, Args...>
644+
>
645+
explicit function_ref(Functor& f) : cb_(&invoke_functor<Functor>)
646+
{
647+
// Ref to this function_ref
648+
::new (storage_.get()) void*(&f);
649+
}
622650

623651
/// \effects Rebinds the reference to the specified functor.
624652
/// \notes This assignment operator only participates in overload resolution,

example/vendor/cget/pkg/foonathan__type_safe/install/include/type_safe/strong_typedef.hpp

+19-19
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)