-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
116 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
example/vendor/cget/pkg/pqrs-org__cpp-hid/install/include/pqrs/hid/report_id.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma once | ||
|
||
// (C) Copyright Takayama Fumihiko 2023. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <compare> | ||
#include <functional> | ||
#include <iostream> | ||
#include <type_safe/strong_typedef.hpp> | ||
|
||
namespace pqrs { | ||
namespace hid { | ||
namespace report_id { | ||
struct value_t : type_safe::strong_typedef<value_t, int32_t>, | ||
type_safe::strong_typedef_op::equality_comparison<value_t>, | ||
type_safe::strong_typedef_op::relational_comparison<value_t> { | ||
using strong_typedef::strong_typedef; | ||
|
||
constexpr auto operator<=>(const value_t& other) const { | ||
return type_safe::get(*this) <=> type_safe::get(other); | ||
} | ||
}; | ||
|
||
inline std::ostream& operator<<(std::ostream& stream, const value_t& value) { | ||
return stream << type_safe::get(value); | ||
} | ||
} // namespace report_id | ||
} // namespace hid | ||
} // namespace pqrs | ||
|
||
namespace std { | ||
template <> | ||
struct hash<pqrs::hid::report_id::value_t> : type_safe::hashable<pqrs::hid::report_id::value_t> { | ||
}; | ||
} // namespace std |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../cget/pkg/pqrs-org__cpp-hid/install/include/pqrs/hid/report_id.hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
tests/vendor/cget/pkg/pqrs-org__cpp-hid/install/include/pqrs/hid/report_id.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma once | ||
|
||
// (C) Copyright Takayama Fumihiko 2023. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <compare> | ||
#include <functional> | ||
#include <iostream> | ||
#include <type_safe/strong_typedef.hpp> | ||
|
||
namespace pqrs { | ||
namespace hid { | ||
namespace report_id { | ||
struct value_t : type_safe::strong_typedef<value_t, int32_t>, | ||
type_safe::strong_typedef_op::equality_comparison<value_t>, | ||
type_safe::strong_typedef_op::relational_comparison<value_t> { | ||
using strong_typedef::strong_typedef; | ||
|
||
constexpr auto operator<=>(const value_t& other) const { | ||
return type_safe::get(*this) <=> type_safe::get(other); | ||
} | ||
}; | ||
|
||
inline std::ostream& operator<<(std::ostream& stream, const value_t& value) { | ||
return stream << type_safe::get(value); | ||
} | ||
} // namespace report_id | ||
} // namespace hid | ||
} // namespace pqrs | ||
|
||
namespace std { | ||
template <> | ||
struct hash<pqrs::hid::report_id::value_t> : type_safe::hashable<pqrs::hid::report_id::value_t> { | ||
}; | ||
} // namespace std |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../cget/pkg/pqrs-org__cpp-hid/install/include/pqrs/hid/report_id.hpp |