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
Valued Contributor
Posts: 52
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

Post Reply