Page 1 of 1

boost::lexical_cast

Posted: Mon Sep 13, 2021 6:08 am
by ofm
Hi,
This doesn't compile,

Code: Select all

#define __USE_STD_IOSTREAM
#include <iostream>
#include <boost/lexical_cast.hpp>
int main(int argc, char** argv) {
  std::string tmp = boost::lexical_cast<std::string>(argc);

  std::cout << tmp << '\n';
}
Fails with:

Code: Select all

                   !(boost::detail::is_character<Target>::value) &&
..................................................................^
%CXX-E-EXPPRIMEXPR, expected an expression
at line number 76 in file VARIOUS:[boost.lexical_cast]try_lexical_convert.hpp;1

                > type;
................^
%CXX-W-ENDFLUSH, parsing restarts here after previous syntax error
at line number 80 in file VARIOUS:[boost.lexical_cast]try_lexical_convert.hpp;1

%CXX-I-MESSAGE, 1 error detected in the compilation of "SOME_NAME:[SOME_DIR]test.cpp;20".
Any clue?

Re: boost::lexical_cast

Posted: Mon Sep 13, 2021 9:10 am
by arne_v
I believe Boost requires C++ 03 or higher.

I don't think VMS C++ is C++ 03 compliant.

So I am not surprised about problems.

And I have never heard of Boost being successful built on VMS.

VMS x86-64 is expected to get clang and then these problem should go away.

Added in 3 hours 46 minutes 23 seconds:
PS: Boost on VMS would be super cool.

Re: boost::lexical_cast

Posted: Sun Mar 17, 2024 8:56 pm
by soutbarr
Any news on using any of boost on vms?

Re: boost::lexical_cast

Posted: Mon Mar 18, 2024 4:16 am
by joukj
Boost is very large. I use a very small part in some of my ports and seems to work fine.

see http://nchrem.tnw.tudelft.nl/openvms/software2.html (packages FSL, OpenBabel & Poppler)


On X86_64 CXX can compile C++ 03 code.