Tencent / wcdb

WCDB is a cross-platform database framework developed by WeChat.
Other
10.61k stars 1.39k forks source link

C++ 使用 struct UnsafeStringView::Convertible<T, typename std::enable_if<ColumnIsTextType<T>::value>::type> #1079

Closed LABELNET closed 3 months ago

LABELNET commented 3 months ago

The language of WCDB

C++

The version of WCDB

2.1.2

The platform of WCDB

ubuntu 20.04 gcc 9.4

The installation of WCDB

下载 https://github.com/Tencent/wcdb/releases/download/v2.1.2/wcdb-2.1.2.zip 源码 cmake build

What's the issue?

Post the outputs or screenshots for errors.

Explain what you want by example or code in English.

error

[build] envs/wcdb/build/export_headers/WCDB/ColumnType.hpp:331:26: error: partial specialization of 'struct WCDB::UnsafeStringView::Convertible<T, typename std::enable_if<WCDB::ColumnIsTextType<T>::value>::type>' after instantiation of 'struct WCDB::UnsafeStringView::Convertible<WCDB::UnsafeStringView, void>' [-fpermissive]
[build]   331 | struct UnsafeStringView::Convertible<T, typename std::enable_if<ColumnIsTextType<T>::value>::type>
[build]       |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] envs/wcdb/build/export_headers/WCDB/ColumnType.hpp:331:26: error: partial specialization of 'struct WCDB::UnsafeStringView::Convertible<T, typename std::enable_if<WCDB::ColumnIsTextType<T>::value>::type>' after instantiation of 'struct WCDB::UnsafeStringView::Convertible<char [3], void>' [-fpermissive]

错误位置

image

尝试注释后,可编译通过,但项目是否可用还未测试

Qiuwen-chen commented 3 months ago

You can build wcdb with "-fpermissive" first. I will check it later.

Qiuwen-chen commented 3 months ago

Fixed in master branch