Comments (7)
I've tried develop. In order to do this, I've had to apply #44 and #45 to the current develop branch.
This leads to a 1MB log file with
- 27 Warning(s)
- 2023 Errors
The interesting one being:
- sqlpp11\tests\Result.cpp(50): error C2338: Yikes [..\sqlcpp11\tests\sqlpp11_tests.vcxpro]
This seems like a lost cause to me, at least as long as the constexpr support is broken. @rbock if you still want the log, drop a note where to put it.
One other note: Please put compiler workarounds in an #idef/#endif
-Block. So users of a conforming compiler are not affected by this and one can easily spot them even without git (read: from a release tarball)
from sqlpp11.
Thanks for the report. "Yikes" is an interesting error message indeed.
Yes, I'd be interested in the log, can you zip and and send it to me rbock eudoxos de?
Regarding your note on workarounds: Do you consider these changes a workaround that justifies an #ifdef
block: 30a3a6b ?
from sqlpp11.
One other note: Please put compiler workarounds in an #idef/#endif-Block.
may be better do it like this?:
// declare the macro
#ifdef _MSVC
# define SQLPP_CONSTEXPR_CSTRING(var, str) \
static constexpr const char var[sizeof(str)] = str
#else
# define SQLPP_CONSTEXPR_CSTRING(var, str) \
static constexpr const char var[] = str
#endif // _MSVC
// usage
SQLPP_CONSTEXPR_CSTRING(varname, "some string");
from sqlpp11.
@niXman Sure, that's an option.
Anyway, if it turns out (and it looks this way from @jhunold 's report) that this is currently a lost cause, I'll just revert this commit and wait for the next release or the release after that...
from sqlpp11.
@niXman Yes, that is better, although checking for _MSVC
is not enough in most cases. Think of Intel compiler disguising as msvc etc. pp.
@rbock I'm not a big fan of obfuscating a clean (and cool 👍 ) c++ code base for a non.conforming compiler. We have too many of those workaround in Boost, some dating back to vc-6.0 and really hard to eliminated. Sigh, some vc-6.0 shortcoming even lead to obfuscated library design, see Boost.Graph for the gory details. I'd rather put more pressure on the compiler vendors. Especially as clang-cl is coming forward and mingw-w64 is already quite promising.
from sqlpp11.
@jhunold Thanks for the log!
Seems like my sizeof
did not work anyway since the compiler is not happy with its usage. And since without the size of the array, MSCV won't understand the constepxr, it's settled: I'll revert the named commit in a minute and continue to concentrate on conforming compilers :-)
Best,
Roland
from sqlpp11.
FYI: MS is getting closer. I just received message from the compiler team today:
This notification was generated for feedback item: static constexpr const char _literal[] = "delta"; // not working inside struct (http://connect.microsoft.com/VisualStudio/feedback/details/1290476/static-constexpr-const-char-literal-delta-not-working-inside-struct) which you submitted at the Microsoft Connect (http://connect.microsoft.com) site.
Thank you for reporting this issue. We've checked in a fix but the fix demands some explanation. Till date the VC++ compiler never had to emit initializers for in-class statics because they were always of scalar types. Now with initializers allowed for arbitrary types for static constexpr members this becomes a problem. We've implemented as many kinds as we can do while minimizing risk to the compiler's quality as we near RTM. We allow the use of such members in constant expressions but some kinds will remain uninitialized at runtime. We emit a warning-as-error (C4759) about this. We do plan to fix this fully in Update 1 but for now this seems to be the best that we can do.
from sqlpp11.
Related Issues (20)
- mingw64, vcpkg, CMake, Project installation cannot find mariadb ? HOT 5
- sqlite connector: execute() silently ignores statements after the first one HOT 7
- how to use binary equal in where HOT 2
- Is there any opentracing support in sqlpp,like jaeger?Will it be supported in the future? HOT 1
- how to fix update exception? HOT 23
- How to retrieve the row count of a query result? HOT 6
- mysql does not seem to support the TIME type HOT 4
- Multiple table query error HOT 3
- Mysql prepared_statement.h missing _bind_time_of_day_parameter function HOT 3
- How do I get record with count of references from one to many? HOT 4
- Handling of `::sqlpp::tag::enforce_null_result_treatment` does not seem to be implemented, NULL documentation is erroneous HOT 11
- scripts/sqlite2cpp.py requires insert of nullable column HOT 6
- [Feedback Requested] Results returning optional, string_view, and span HOT 22
- [requesting assistance] Can the same parameter be used in multiple places in the same prepared statement? HOT 13
- [Need assistance] Common Table Expressions with update HOT 2
- Can't find how to use count(1) HOT 3
- head file include question HOT 3
- how to predict const struct sqlpp::result_row_t is or not NULL? HOT 3
- Supporting the BETWEEN operator? HOT 2
- SQLite: Is order by rowid possible? HOT 2
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 sqlpp11.