Comments (3)
The following code is working by using BOOST 1.61 libraries;
// TODO: change 201701L when optional will become part of standard
#if __cplusplus >= 201701L
#include <string_view>
namespace SuperiorMySqlpp
{
using StringView = std::string_view;
}
#else
#include <boost/utility/string_view.hpp>
namespace SuperiorMySqlpp
{
using StringView = boost::string_view;
inline namespace StringViewLiterals
{
inline boost::basic_string_view<char>
operator""sv(const char* __str, size_t __len)
{
return boost::basic_string_view<char>{__str, __len};
}
inline boost::basic_string_view<wchar_t>
operator""sv(const wchar_t* __str, size_t __len)
{
return boost::basic_string_view<wchar_t>{__str, __len};
}
}
}
#endif
from superiormysqlpp.
Hi,
maybe it would be better to use
#elif _MSC_VER ...
or
#elif __cpp_lib_experimental_string_view >=201411 (according to http://en.cppreference.com/w/cpp/experimental/basic_string_view)
Can you please try it?
from superiormysqlpp.
This header does not exist in MSVC.
from superiormysqlpp.
Related Issues (20)
- RowStreamAdapter should support non-default-constructible types HOT 1
- Make user-defined converters include-order independent
- Linker error with gcc 10 and multiple translation units including superior_mysqlpp.hpp HOT 1
- an cmake issue HOT 4
- Inconsistency in server options
- Problem with `cout <<Β row;`
- clang v. 3.5.0 doesn't compile if including superior_mysql.hpp HOT 11
- Incorrect size passed to memset while clearing params/resultsBinding vectors HOT 3
- Noexcept function should not throw an exception HOT 1
- Incorrect functions called to get error info when mysql_stmt_close fails
- Default logger should also log errors to std::cerr
- Missing feature: affectedRows method for prepared statements
- makeHexString suitable for std::string
- DBDriver::Result::freeResult() is useless HOT 1
- Propagate return value of mysql_row_seek and mysql_stmt_row_seek
- mysql_sqlstate
- DBDriver - many methods can be noexcept
- How to use this client with multi master mode of MySQL with Galera cluster enabled HOT 1
- Full logger implementation uses noexcept for methods that can throw exceptions HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superiormysqlpp.