Skip to content

Commit 5aab514

Browse files
committed
Add a const_pointer constructor
1 parent cf2790e commit 5aab514

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

include/graphqlservice/GraphQLResponse.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ struct [[nodiscard]] IdType
7070
GRAPHQLRESPONSE_EXPORT IdType(std::initializer_list<typename ByteData::value_type> values);
7171
GRAPHQLRESPONSE_EXPORT IdType(
7272
typename ByteData::const_iterator begin, typename ByteData::const_iterator end);
73+
GRAPHQLRESPONSE_EXPORT IdType(
74+
typename ByteData::const_pointer begin, typename ByteData::const_pointer end);
7375

7476
// Assignment
7577
GRAPHQLRESPONSE_EXPORT IdType& operator=(IdType&& rhs) noexcept;

src/GraphQLResponse.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ IdType::IdType(typename ByteData::const_iterator begin, typename ByteData::const
4646
{
4747
}
4848

49+
IdType::IdType(typename ByteData::const_pointer begin, typename ByteData::const_pointer end)
50+
: _data { ByteData { begin, end } }
51+
{
52+
}
53+
4954
IdType& IdType::operator=(IdType&& rhs) noexcept
5055
{
5156
if (&rhs != this)

0 commit comments

Comments
 (0)