I have recently upgraded to Boost 1.46 and am having trouble compiling the following simple program (Using Visual Studio 2005):

 

// Error.cpp : Defines the entry point for the console application.

//

 

#include "stdafx.h"

#include <tchar.h>

#include <iostream>

#include <boost/property_tree/ptree.hpp>

#include <boost/property_tree/json_parser.hpp>

 

void Go()

{

      boost::property_tree::ptree t;

      boost::property_tree::read_json(std::cin, t);

}

 

int _tmain(int argc, _TCHAR* argv[])

{

      Go();

      return 0;

}

 

Here are the errors I get:

1>------ Build started: Project: Error, Configuration: Debug Win32 ------

1>Compiling...

1>stdafx.cpp

1>Compiling...

1>Error.cpp

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(184) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>        c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(178) : while compiling class template member function 'boost::property_tree::json_parser::json_grammar<Ptree>::definition<Scanner>::definition(const boost::property_tree::json_parser::json_grammar<Ptree> &)'

1>        with

1>        [

1>            Ptree=boost::property_tree::ptree,

1>            Scanner=scanner_t

1>        ]

1>        c:\libraries\boost_1_46_0\boost\spirit\home\classic\core\non_terminal\impl\grammar.ipp(279) : see reference to class template instantiation 'boost::property_tree::json_parser::json_grammar<Ptree>::definition<Scanner>' being compiled

1>        with

1>        [

1>            Ptree=boost::property_tree::ptree,

1>            Scanner=scanner_t

1>        ]

1>        c:\libraries\boost_1_46_0\boost\spirit\home\classic\core\non_terminal\impl\grammar.ipp(298) : see reference to function template instantiation 'void boost::spirit::classic::impl::call_helper<0>::do_<result_t,definition_t,ScannerT>(RT &,DefinitionT &,const ScannerT &)' being compiled

1>        with

1>        [

1>            ScannerT=scanner_t,

1>            RT=result_t,

1>            DefinitionT=definition_t

1>        ]

1>        c:\libraries\boost_1_46_0\boost\spirit\home\classic\core\non_terminal\grammar.hpp(55) : see reference to function template instantiation 'boost::spirit::classic::match<boost::spirit::classic::nil_t> boost::spirit::classic::impl::grammar_parser_parse<0,boost::property_tree::json_parser::json_grammar<Ptree>,boost::spirit::classic::parser_context<>,ScannerT>(const boost::spirit::classic::grammar<DerivedT> *,const ScannerT &)' being compiled

1>        with

1>        [

1>            Ptree=boost::property_tree::ptree,

1>            ScannerT=scanner_t,

1>            DerivedT=boost::property_tree::json_parser::json_grammar<boost::property_tree::ptree>

1>        ]

1>        c:\libraries\boost_1_46_0\boost\spirit\home\classic\core\non_terminal\grammar.hpp(65) : see reference to function template instantiation 'boost::spirit::classic::match<boost::spirit::classic::nil_t> boost::spirit::classic::grammar<DerivedT>::parse_main<ScannerT>(const ScannerT &) const' being compiled

1>        with

1>        [

1>            DerivedT=boost::property_tree::json_parser::json_grammar<boost::property_tree::ptree>,

1>            ScannerT=scanner_t

1>        ]

1>        c:\libraries\boost_1_46_0\boost\spirit\home\classic\core\scanner\impl\skipper.ipp(109) : see reference to function template instantiation 'boost::spirit::classic::match<boost::spirit::classic::nil_t> boost::spirit::classic::grammar<DerivedT>::parse<scanner_t>(const ScannerT &) const' being compiled

1>        with

1>        [

1>            DerivedT=boost::property_tree::json_parser::json_grammar<boost::property_tree::ptree>,

1>            ScannerT=scanner_t

1>        ]

1>        c:\libraries\boost_1_46_0\boost\spirit\home\classic\core\scanner\impl\skipper.ipp(155) : see reference to function template instantiation 'boost::spirit::classic::parse_info<IteratorT> boost::spirit::classic::impl::phrase_parser<SkipT>::parse<IteratorT,DerivedT>(const IteratorT &,const IteratorT &,const ParserT &,const SkipT &)' being compiled

1>        with

1>        [

1>            IteratorT=It,

1>            SkipT=boost::spirit::classic::alternative<boost::spirit::classic::alternative<boost::spirit::classic::space_parser,boost::spirit::classic::confix_parser<boost::spirit::classic::impl::string_as_parser::type,boost::spirit::classic::kleene_star<boost::spirit::classic::anychar_parser>,boost::spirit::classic::alternative<boost::spirit::classic::eol_parser,boost::spirit::classic::end_parser>,boost::spirit::classic::unary_parser_category,boost::spirit::classic::non_nested,boost::spirit::classic::is_lexeme>>,boost::spirit::classic::confix_parser<boost::spirit::classic::impl::string_as_parser::type,boost::spirit::classic::kleene_star<boost::spirit::classic::anychar_parser>,boost::spirit::classic::impl::string_as_parser::type,boost::spirit::classic::unary_parser_category,boost::spirit::classic::non_nested,boost::spirit::classic::is_lexeme>>,

1>            DerivedT=boost::property_tree::json_parser::json_grammar<boost::property_tree::ptree>,

1>            ParserT=boost::property_tree::json_parser::json_grammar<boost::property_tree::ptree>

1>        ]

1>        c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(312) : see reference to function template instantiation 'boost::spirit::classic::parse_info<IteratorT> boost::spirit::classic::parse<std::_Vector_iterator<_Ty,_Alloc>,DerivedT,boost::spirit::classic::alternative<A,B>>(const IteratorT &,const IteratorT &,const boost::spirit::classic::parser<DerivedT> &,const boost::spirit::classic::parser<boost::spirit::classic::alternative<A,B>> &)' being compiled

1>        with

1>        [

1>            IteratorT=It,

1>            _Ty=Ch,

1>            _Alloc=std::allocator<char>,

1>            DerivedT=boost::property_tree::json_parser::json_grammar<boost::property_tree::ptree>,

1>            A=boost::spirit::classic::alternative<boost::spirit::classic::space_parser,boost::spirit::classic::confix_parser<boost::spirit::classic::impl::string_as_parser::type,boost::spirit::classic::kleene_star<boost::spirit::classic::anychar_parser>,boost::spirit::classic::alternative<boost::spirit::classic::eol_parser,boost::spirit::classic::end_parser>,boost::spirit::classic::unary_parser_category,boost::spirit::classic::non_nested,boost::spirit::classic::is_lexeme>>,

1>            B=boost::spirit::classic::confix_parser<boost::spirit::classic::impl::string_as_parser::type,boost::spirit::classic::kleene_star<boost::spirit::classic::anychar_parser>,boost::spirit::classic::impl::string_as_parser::type,boost::spirit::classic::unary_parser_category,boost::spirit::classic::non_nested,boost::spirit::classic::is_lexeme>

1>        ]

1>        c:\libraries\boost_1_46_0\boost\property_tree\json_parser.hpp(45) : see reference to function template instantiation 'void boost::property_tree::json_parser::read_json_internal<Ptree>(std::basic_istream<_Elem,_Traits> &,Ptree &,const std::string &)' being compiled

1>        with

1>        [

1>            Ptree=boost::property_tree::ptree,

1>            _Elem=char,

1>            _Traits=std::char_traits<char>

1>        ]

1>        c:\users\steve\documents\visual studio 2005\projects\error\error.cpp(13) : see reference to function template instantiation 'void boost::property_tree::json_parser::read_json<boost::property_tree::ptree>(std::basic_istream<_Elem,_Traits> &,Ptree &)' being compiled

1>        with

1>        [

1>            _Elem=char,

1>            _Traits=std::char_traits<char>,

1>            Ptree=boost::property_tree::ptree

1>        ]

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(184) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(184) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(184) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(184) : error C2882: 'assertion' : illegal use of namespace identifier in expression

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(184) : error C3861: 'expect_object': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(185) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(185) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(185) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(185) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(185) : error C2882: 'assertion' : illegal use of namespace identifier in expression

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(185) : error C3861: 'expect_eoi': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(186) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(186) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(186) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(186) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(186) : error C2882: 'assertion' : illegal use of namespace identifier in expression

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(186) : error C3861: 'expect_objclose': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(187) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(187) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(187) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(187) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(187) : error C2882: 'assertion' : illegal use of namespace identifier in expression

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(187) : error C3861: 'expect_arrclose': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(188) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(188) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(188) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(188) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(188) : error C2882: 'assertion' : illegal use of namespace identifier in expression

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(188) : error C3861: 'expect_name': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(189) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(189) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(189) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(189) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(189) : error C2882: 'assertion' : illegal use of namespace identifier in expression

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(189) : error C3861: 'expect_colon': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(190) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(190) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(190) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(190) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(190) : error C2882: 'assertion' : illegal use of namespace identifier in expression

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(190) : error C3861: 'expect_value': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(191) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(191) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(191) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(191) : error C2872: 'assertion' : ambiguous symbol

1>        could be 'boost::assertion'

1>        or 'c:\libraries\boost_1_46_0\boost\spirit\home\classic\error_handling\exceptions.hpp(187) : boost::spirit::classic::assertion'

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(191) : error C2882: 'assertion' : illegal use of namespace identifier in expression

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(191) : error C3861: 'expect_escape': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(195) : error C3861: 'expect_object': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(196) : error C3861: 'expect_eoi': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(203) : error C3861: 'expect_objclose': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(209) : error C3861: 'expect_name': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(210) : error C3861: 'expect_colon': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(211) : error C3861: 'expect_value': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(218) : error C3861: 'expect_arrclose': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(224) : error C3861: 'expect_value': identifier not found

1>c:\libraries\boost_1_46_0\boost\property_tree\detail\json_parser_read.hpp(250) : error C3861: 'expect_escape': identifier not found

1>Build log was saved at "file://c:\Users\Steve\Documents\Visual Studio 2005\Projects\Error\Debug\BuildLog.htm"

1>Error - 57 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========