boost::lexical_cast

Post Reply

Topic author
ofm
Visitor
Posts: 1
Joined: Wed Aug 19, 2020 1:12 am
Reputation: 0
Status: Offline

boost::lexical_cast

Post by ofm » Mon Sep 13, 2021 6:08 am

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?

User avatar

arne_v
Master
Posts: 299
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: boost::lexical_cast

Post by arne_v » Mon Sep 13, 2021 9:10 am

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.
Arne
arne@vajhoej.dk
VMS user since 1986


soutbarr
Contributor
Posts: 13
Joined: Wed Mar 13, 2024 4:45 pm
Reputation: 0
Status: Offline

Re: boost::lexical_cast

Post by soutbarr » Sun Mar 17, 2024 8:56 pm

Any news on using any of boost on vms?


joukj
Master
Posts: 158
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

Re: boost::lexical_cast

Post by joukj » Mon Mar 18, 2024 4:16 am

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.

Post Reply