Giter Club home page Giter Club logo

Comments (7)

jhunold avatar jhunold commented on August 24, 2024

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.

rbock avatar rbock commented on August 24, 2024

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.

niXman avatar niXman commented on August 24, 2024

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.

rbock avatar rbock commented on August 24, 2024

@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.

jhunold avatar jhunold commented on August 24, 2024

@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.

rbock avatar rbock commented on August 24, 2024

@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.

rbock avatar rbock commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.