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.