no known conversion from 'const char [57]' to 'const scriptnum_error' #5126

issue gavinandresen opened this issue on October 23, 2014
  1. gavinandresen commented at 4:47 PM on October 23, 2014: contributor

    I get an error compiling git HEAD:

    In file included from ./script/compressor.h:9: ./script/script.h:197:19: error: no matching conversion for functional-style cast from 'const char [57]' to 'scriptnum_error' throw scriptnum_error("CScriptNum(const std::vector<unsigned char>&) : overflow"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./script/script.h:173:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const char [57]' to 'const scriptnum_error' for 1st argument class scriptnum_error : public std::runtime_error ^ ./script/script.h:176:14: note: candidate constructor not viable: no known conversion from 'const char [57]' to 'const std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> >') for 1st argument explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {} ^ 1 error generated.

  2. gavinandresen added the label Bug on Oct 23, 2014
  3. gavinandresen added the label Priority High on Oct 23, 2014
  4. gavinandresen added the label Mac on Oct 23, 2014
  5. theuni commented at 6:01 PM on October 23, 2014: member
    #include <string>
    

    in script.h should fix. I reproduced it very closely with libc++. Could you please verify?

  6. laanwj commented at 1:38 PM on October 24, 2014: member

    Hm @theuni do we need a Travis build with libc++?

  7. theuni commented at 1:43 PM on October 24, 2014: member

    Yea. I'd like to look at that after 0.10. I've got a rework of the OSX build that can use more recent SDKs and compilers, it may make sense to use libc++ there.

  8. theuni commented at 6:08 PM on October 31, 2014: member

    This can be closed, it was fixed by 3a757c529

  9. laanwj closed this on Dec 29, 2014

  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me