From d7603db7d3c38721a47592711484bee8e5c2acd2 Mon Sep 17 00:00:00 2001 From: LEE Wondong Date: Wed, 23 Sep 2015 14:28:14 +0900 Subject: [PATCH] Fix Column::operator std::string to work properly on Visual C++ 2015 --- include/SQLiteCpp/Column.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/SQLiteCpp/Column.h b/include/SQLiteCpp/Column.h index 591419c..50cbc16 100644 --- a/include/SQLiteCpp/Column.h +++ b/include/SQLiteCpp/Column.h @@ -187,10 +187,10 @@ public: return getBlob(); } -#ifdef __GNUC__ +#if !(defined(_MSC_VER) && _MSC_VER < 1900) // NOTE : the following is required by GCC and Clang to cast a Column result in a std::string // (error: conversion from ‘SQLite::Column’ to non-scalar type ‘std::string {aka std::basic_string}’) - // but is not working under Microsoft Visual Studio 2010 and 2012 + // but is not working under Microsoft Visual Studio 2010, 2012 and 2013 // (error C2440: 'initializing' : cannot convert from 'SQLite::Column' to 'std::basic_string<_Elem,_Traits,_Ax>' // [...] constructor overload resolution was ambiguous) /// Inline cast operator to std::string