3

Borland の 32 ビット コンパイラを使用して MySql++ をコンパイルしようとしています。このコンパイラは、一部のテンプレート構文に問題があることがよく知られています。コンパイラも、clang コンパイラに置き換えられているため、ほとんど廃止されています。

ただし、次のコードをコンパイル可能なバージョンに修正できれば、時間を節約できます。

コンパイラ エラーは次の行で発生します。

template <> MYSQLPP_EXPORT bool String::conv(bool) const;

コンパイラ エラーは次のとおりです。

[bcc32 エラー] mystring.h(726): E2506 'String::conv<Type>(Type) const' の明示的な特殊化があいまいです: テンプレート引数を指定する必要があります
完全なパーサー コンテキスト
transaction.cpp(32): #include lib\query .h
query.h(37): #include lib\result.h
result.h(40): #include lib\row.h
row.h(33): #include lib\mystring.h
mystring.h(46) : 名前空間 mysqlpp

Stringはカスタム文字列クラスであり、関数はクラスconv()内のインライン テンプレート関数です。String

/// \brief Template for converting the column data to most any
/// numeric data type.
template <class Type>
Type conv(Type) const
{
    // Conversions are done using one of double/long/ulong/llong/ullong
    // so we call a helper function to do the work using that type.
    // This reduces the amount of template code instantiated.
    typedef typename detail::conv_promotion<Type>::type conv_type;
    return do_conv<conv_type>(typeid(Type).name());
}

さまざまな変更を試みましたが、成功しませんでした。

4

1 に答える 1