Skip to content

Commit de5bae4

Browse files
author
pippocao
committed
Compiling issue fix on DragonFlyBSD + GCC
1 parent 7487c21 commit de5bae4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

include/bq_common/types/string_tools.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <string.h>
2222
#include <ctype.h>
2323
#include <wchar.h>
24+
#include "bq_common/types/type_tools.h"
25+
#include "bq_common/types/type_traits.h"
2426

2527
namespace bq {
2628
namespace string_tools {
@@ -31,19 +33,23 @@ namespace bq {
3133
struct __has_value_type<T, bq::void_t<typename T::value_type>> : bq::true_type {};
3234

3335
template <typename T>
34-
struct is_c_str_compatible : bq::bool_type<bq::string::is_std_string_compatible<T>::value || bq::u16string::is_std_string_compatible<T>::value || bq::u32string::is_std_string_compatible<T>::value> {};
36+
struct is_c_str_compatible : bq::bool_type<bq::string::template is_std_string_compatible<T>::value ||
37+
bq::u16string::template is_std_string_compatible<T>::value ||
38+
bq::u32string::template is_std_string_compatible<T>::value> {};
3539

3640
template <typename T>
37-
struct is_data_compatible : bq::bool_type<bq::string::is_std_string_view_compatible<T>::value || bq::u16string::is_std_string_view_compatible<T>::value || bq::u32string::is_std_string_view_compatible<T>::value> {};
41+
struct is_data_compatible : bq::bool_type<bq::string::template is_std_string_view_compatible<T>::value ||
42+
bq::u16string::template is_std_string_view_compatible<T>::value ||
43+
bq::u32string::template is_std_string_view_compatible<T>::value> {};
3844

3945
template <typename T>
40-
inline auto __bq_string_compatible_class_get_data(const T& str) -> typename bq::enable_if_t<is_c_str_compatible<T>::value, const typename T::value_type*>
46+
inline auto __bq_string_compatible_class_get_data(const T& str) -> bq::enable_if_t<is_c_str_compatible<T>::value, const typename T::value_type*>
4147
{
4248
return str.c_str();
4349
}
4450

4551
template <typename T>
46-
inline auto __bq_string_compatible_class_get_data(const T& str) -> typename bq::enable_if_t<is_data_compatible<T>::value, const typename T::value_type*>
52+
inline auto __bq_string_compatible_class_get_data(const T& str) -> bq::enable_if_t<is_data_compatible<T>::value, const typename T::value_type*>
4753
{
4854
return str.data();
4955
}

0 commit comments

Comments
 (0)