Boost logo

Boost Users :

Subject: [Boost-users] Problem with boost::any_cast on SUN CC 5.10
From: Alexander Vinokur (Alexander.Vinokur_at_[hidden])
Date: 2009-12-28 04:11:34


I have the following problem.

Here is some program.
File myFile1.cpp
#include <boost/any.hpp>
int main()
  long myLongValue = 123;
  long long myLongLongValue = 123;

  boost::any_cast<long long>(myLongLongValue);

            return 0;

Compilation on machine1
machine1> uname -a
SunOS machine1 5.10 Generic_127111-11 sun4v sparc SUNW,SPARC-Enterprise-T5220

machine1> CC -V
CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25

machine1> CC -m64 -I/local64/boost_1_34_0 myFile1.cpp
machine1> // No errors

Compilation on machine2
machine2> uname -a
SunOS machine2 5.10 Generic_139555-08 sun4u sparc SUNW,SPARC-Enterprise

machine2> CC -V
CC: Sun C++ 5.10 SunOS_sparc 128228-03 2009/11/05
Usage: CC [ options ] files. Use 'CC -flags' for details

machine2> CC -m64 -I/local64/boost_1_34_0 myFile1.cpp
"myFile1.cpp", line 7: Error: Could not find a match for boost::any_cast<boost::ValueType>(long) needed in main().
"myFile1.cpp", line 8: Error: Could not find a match for boost::any_cast<boost::ValueType>(long long) needed in main().
2 Error(s) detected.

Any suggestions?

Alex Vinokur


This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at