Skip to content

Commit 256dd63

Browse files
committed
Refactor
1 parent 03697b0 commit 256dd63

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/tao/json/binary.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,20 @@ namespace tao
3636
return unhex< T, V, Cs... >( make_index_sequence< sizeof...( Cs ) / 2 >(), { unhex_char( Cs )... } );
3737
}
3838

39+
template< typename T, char... Cs >
40+
constexpr T unhex()
41+
{
42+
return unhex< T, typename T::value_type, Cs... >();
43+
}
44+
3945
} // namespace internal
4046

4147
inline namespace literals
4248
{
4349
template< char... Cs >
4450
std::vector< byte > operator"" _binary()
4551
{
46-
return internal::unhex< std::vector< byte >, byte, Cs... >();
52+
return internal::unhex< std::vector< byte >, Cs... >();
4753
}
4854

4955
} // namespace literals

0 commit comments

Comments
 (0)