Giter Club home page Giter Club logo

Comments (14)

JosephP91 avatar JosephP91 commented on May 18, 2024

Hi @antonlukyanov ,
can you try replacing it with noexcept?

from curlcpp.

antonlukyanov avatar antonlukyanov commented on May 18, 2024

@JosephP91, replacing NOEXCEPT to noexcept solved the problem, thanks. However, there are many places in headers where NOEXCEPT is used and everything compiles fine except for curl_header.h.

from curlcpp.

JosephP91 avatar JosephP91 commented on May 18, 2024

@antonlukyanov yes, I noticed this thing now. It's very strange. @qqiangwu how is this possible? In curl_header.h and curl_header.cpp, if I replace NOEXCEPT with noexcept, everything compiles. If I use NOEXCEPT it does not compile.

from curlcpp.

qqiangwu avatar qqiangwu commented on May 18, 2024

@antonlukyanov What's your compiler? gcc or mingw?

from curlcpp.

JosephP91 avatar JosephP91 commented on May 18, 2024

@qqiangwu I think MinGW. It is written in the first comment.

from curlcpp.

antonlukyanov avatar antonlukyanov commented on May 18, 2024

@qqiangwu, here is more precise information about used compiler:

$ g++ --version
g++.exe (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 4.9.1

from curlcpp.

qqiangwu avatar qqiangwu commented on May 18, 2024

@JosephP91 I forgot to add #include "curl_config.h" to curl_header.h, so the macro NOEXCEPT cannot be found and be parsed as a normal symbol.

from curlcpp.

JosephP91 avatar JosephP91 commented on May 18, 2024

@qqiangwu Oh, ok! I added the include. Thank you!

from curlcpp.

JosephP91 avatar JosephP91 commented on May 18, 2024

Solved

from curlcpp.

qqiangwu avatar qqiangwu commented on May 18, 2024

@JosephP91 BTW, destructors are by default noexcept, so the NOEXCEPT in ~curl_header() NOEXCEPT; is redundant. :)

from curlcpp.

JosephP91 avatar JosephP91 commented on May 18, 2024

@qqiangwu So I could remove the NOEXCEPT from every destructor declaration. Right?

from curlcpp.

qqiangwu avatar qqiangwu commented on May 18, 2024

@JosephP91 Yeah! See also http://en.cppreference.com/w/cpp/language/noexcept_spec

from curlcpp.

JosephP91 avatar JosephP91 commented on May 18, 2024

It's always good to learn something! Thank you!

from curlcpp.

yghaziza avatar yghaziza commented on May 18, 2024

I still see this error when I compile with curl...
c:/.../curlcpp/include/curl_exception.h:64:25: error: expected ';' at end of member declaration
~curl_exception() NOEXCEPT;
^
In file included from c:/.../curlcpp/include/curl_easy.h:33:0,

c:/.../curlcpp/include/curl_config.h:32:22: error: 'noexcept' does not name a type
#define NOEXCEPT noexcept
etc.
I'm using the recent package of curlcpp and my gcc compiler version is even newer:
$ gcc --version
gcc.exe (i686-posix-dwarf-rev1, Built by MinGW-W64 project) 4.9.2

Any suggestions how to fix this compilation error? I don't want (and don't think I should be) to remove NOEXCEPT from curlcpp package as it compiles just fine and I was able to create the library.

from curlcpp.

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.