ライブラリは std::string を使用しています。特定のアプリケーションがリンクされると、ライブラリで実行される文字列操作が完全にクラッシュします。
たとえば、文字列代入演算子 '=' (スタック トレースが添付されています)。
memcpy_s( ... ) の宛先とサイズはかなりごちゃ混ぜに見えます。
ローカルで再現することはできません。ご意見をお聞かせください。
編集: コードは次のようになります。
...
#define DEFAULT_VAL "value"
...
class MyClass {
public:
MyClass(const std::string& s=DEFAULT_VAL)
{
_test() = s;
}
protected:
inline const std::string& test() const {return m_test;}
inline std::string& _test() {return m_test;}
private:
std::string m_test;
};
....
MyClass c;