GithubHelp home page GithubHelp logo

Stack Overflow about scnlib HOT 5 CLOSED

eliaskosunen avatar eliaskosunen commented on May 31, 2024
Stack Overflow

from scnlib.

Comments (5)

eliaskosunen avatar eliaskosunen commented on May 31, 2024

There's a bug in the standard regarding std::string_view and its constructors, which will hopefully be fixed in C++20. I've worked around that in 018099e.

Does that fix the issue? I can't reproduce a stack overflow on any of the examples on my machine (Linux, both gcc and clang).

from scnlib.

SuperWig avatar SuperWig commented on May 31, 2024

It does not, looking at the call stack seems to be a recursion issue.

main.exe!scn::v0::detail::_wrap::fn::operator()<scn::v0::basic_file_view &>(scn::v0::basic_file_view & r) Line 274 C++
main.exe!scn::v0::detail::_wrap::fn::impl<scn::v0::basic_file_view &>(scn::v0::basic_file_view & r, scn::v0::detail::priority_tag<3> __formal) Line 236 C++
main.exe!scn::v0::detail::_wrap::fn::operator()<scn::v0::basic_file_view &>(scn::v0::basic_file_view & r) Line 275 C++
main.exe!scn::v0::detail::_wrap::fn::impl<scn::v0::basic_file_view &>(scn::v0::basic_file_view & r, scn::v0::detail::priority_tag<3> __formal) Line 236 C++
....
....

from scnlib.

eliaskosunen avatar eliaskosunen commented on May 31, 2024

What version of VS 2019? I have 16.3.5, and I still can't reproduce. Just to be 100% sure: you're talking about the example at the very top of the README (which is also pretty much equivalent to examples/example-1.cpp)?

If it's an issue with your compiler being broken around ADL, try the branch msvc-adl, and tell me if that fixes the issue.

from scnlib.

SuperWig avatar SuperWig commented on May 31, 2024

Yes this one

#include <scn/scn.h>
#include <cstdio>

int main() {
	int i;
	// Read an integer from stdin
	// with an accompanying message
	scn::prompt("What's your favorite number? ", "{}", i);
	printf("Oh, cool, %d!", i);
}

And same version of VS 2019. The specific version of MSVC is 19.23.28106.4. Just tested the adl branch and that works fine.

Edit: retested master to double check I wasn't compiling with the pre-patched version earlier. And I get a stackoverflow again.

from scnlib.

eliaskosunen avatar eliaskosunen commented on May 31, 2024

Interesting. Nevertheless, it works now. Thanks for reporting!

from scnlib.

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.