VS2015 Chaiscript V6.0 compiler warning C4503


#1

Switching to V6, get C4503 compiler warnings - “decorated name length exceeded, name was truncated”

Does not affect operation of the code, but a nuisance. I can #pragma the warning away, of course. Is that the suggested course of action?

code is just ‘hello’ program.

#include "stdafx.h"

#include "chaiscript\chaiscript.hpp"

std::string helloWorld(const std::string &t_name)
{
	return "Hello " + t_name + "!";

}

int main()
{
	chaiscript::ChaiScript cs;
	cs.add(chaiscript::fun(&helloWorld), "helloWorld");


	cs.eval(R"(
		puts(helloWorld("Tom"));
	)");


	system("pause");

    return 0;
}

errors:

chai-6-test.cpp
1>e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\proxy_functions_detail.hpp(100): warning C4503: ‘__LINE__Var’: decorated name length exceeded, name was truncated
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\proxy_functions_detail.hpp(114): note: see reference to function template instantiation ‘Ret chaiscript::dispatch::detail::call_func<Callable,std::shared_ptr,const std::map<std::string,chaiscript::Boxed_Value,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>&,0>(const chaiscript::dispatch::detail::Function_Signature &,std::integer_sequence<unsigned int,0>,const Callable &,const std::vector<_Ty,std::allocator<_Ty>> &,const chaiscript::Type_Conversions_State &)’ being compiled
1> with
1> [
1> Ret=std::shared_ptr<chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>>,
1> Callable=chaiscript::dispatch::detail::Constructor<chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>> &>,
1> Class=chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,
1> _Kty=std::string,
1> _Ty=chaiscript::Boxed_Value,
1> Func=std::shared_ptr<chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>> (const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>> &)
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\proxy_functions.hpp(650): note: see reference to function template instantiation ‘chaiscript::Boxed_Value chaiscript::dispatch::detail::call_func<Callable,std::shared_ptr,const std::map<std::string,chaiscript::Boxed_Value,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>&>(const chaiscript::dispatch::detail::Function_Signature &,const Callable &,const std::vector<_Ty,std::allocator<_Ty>> &,const chaiscript::Type_Conversions_State &)’ being compiled
1> with
1> [
1> Callable=chaiscript::dispatch::detail::Constructor<chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>> &>,
1> Class=chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,
1> _Kty=std::string,
1> _Ty=chaiscript::Boxed_Value,
1> Func=std::shared_ptr<chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>> (const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>> &)
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\proxy_functions.hpp(649): note: while compiling class template member function ‘chaiscript::Boxed_Value chaiscript::dispatch::Proxy_Function_Callable_Impl<std::shared_ptr (const std::map<std::string,chaiscript::Boxed_Value,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &),chaiscript::dispatch::detail::Constructor<Class,const std::map<_Kty,_Ty,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &>>::do_call(const std::vector<_Ty,std::allocator<_Ty>> &,const chaiscript::Type_Conversions_State &) const’
1> with
1> [
1> Class=chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,
1> _Kty=std::string,
1> _Ty=chaiscript::Boxed_Value
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\chaiscript_defines.hpp(92): note: see reference to class template instantiation ‘chaiscript::dispatch::Proxy_Function_Callable_Impl<std::shared_ptr (const std::map<std::string,chaiscript::Boxed_Value,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &),chaiscript::dispatch::detail::Constructor<Class,const std::map<_Kty,_Ty,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &>>’ being compiled
1> with
1> [
1> Class=chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,
1> _Kty=std::string,
1> _Ty=chaiscript::Boxed_Value
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\proxy_constructors.hpp(29): note: see reference to function template instantiation ‘std::shared_ptrchaiscript::dispatch::Proxy_Function_Base chaiscript::make_shared<chaiscript::dispatch::Proxy_Function_Base,chaiscript::dispatch::Proxy_Function_Callable_Impl<std::shared_ptr (const std::map<std::string,chaiscript::Boxed_Value,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &),chaiscript::dispatch::detail::Constructor<Class,const std::map<_Kty,_Ty,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &>>,chaiscript::dispatch::detail::Constructor<Class,const std::map<_Kty,_Ty,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &>&>(chaiscript::dispatch::detail::Constructor<Class,const std::map<_Kty,_Ty,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &> &)’ being compiled
1> with
1> [
1> Class=chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,
1> _Kty=std::string,
1> Ty=chaiscript::Boxed_Value
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\proxy_constructors.hpp(50): note: see reference to function template instantiation 'chaiscript::Proxy_Function chaiscript::dispatch::detail::build_constructor
<Bidir_Type,const std::map<std::string,chaiscript::Boxed_Value,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>&>(Class (__cdecl *)(const std::map<_Kty,_Ty,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &))’ being compiled
1> with
1> [
1> Bidir_Type=chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,
1> _Kty=std::string,
1> _Ty=chaiscript::Boxed_Value,
1> Class=chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\bootstrap_stl.hpp(131): note: see reference to function template instantiation ‘chaiscript::Proxy_Function chaiscript::constructor<Bidir_Type(const std::map<std::string,chaiscript::Boxed_Value,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &)>(void)’ being compiled
1> with
1> [
1> Bidir_Type=chaiscript::bootstrap::standard_library::Bidir_Range<const std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const std::string,chaiscript::Boxed_Value>>>>>,
1> _Kty=std::string,
1> _Ty=chaiscript::Boxed_Value
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\bootstrap_stl.hpp(179): note: see reference to function template instantiation ‘void chaiscript::bootstrap::standard_library::detail::input_range_type_impl<chaiscript::bootstrap::standard_library::Bidir_Range<const ContainerType,std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const _Kty,_Ty>>>>>>(const std::string &,chaiscript::Module &)’ being compiled
1> with
1> [
1> ContainerType=std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>,
1> _Kty=std::string,
1> _Ty=chaiscript::Boxed_Value
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\dispatchkit\bootstrap_stl.hpp(538): note: see reference to function template instantiation ‘void chaiscript::bootstrap::standard_library::input_range_type(const std::string &,chaiscript::Module &)’ being compiled
1> with
1> [
1> MapType=std::map<std::string,chaiscript::Boxed_Value,std::lessstd::string,std::allocator<std::pair<const std::string,chaiscript::Boxed_Value>>>
1> ]
1> e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chaiscript\chaiscript_stdlib.hpp(52): note: see reference to function template instantiation ‘void chaiscript::bootstrap::standard_library::map_type<std::map<std::string,chaiscript::Boxed_Value,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>>(const std::string &,chaiscript::Module &)’ being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=chaiscript::Boxed_Value
1> ]
1>e:\docs\visual studio 2015\projects\chai-6-test\chai-6-test\chai-6-test.cpp(30): warning C4503: ‘chaiscript::dispatch::detail::call_func’: decorated name length exceeded, name was truncated
1> chai-6-test.vcxproj -> e:\docs\visual studio 2015\Projects\chai-6-test\Debug\chai-6-test.exe
1> chai-6-test.vcxproj -> e:\docs\visual studio 2015\Projects\chai-6-test\Debug\chai-6-test.pdb (Full PDB)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


#2

I’m surprised you’re just now getting this warning when switching to ChaiScript 6.0. It has existed in literally every version of ChaiScript with every version of MSVC that we have supported.

The Visual Studio team announced that they are removing the warning in MSVC2017 due to the meaninglessness of the warning.

The only advice I have is to disable that particular warning for your builds.

-Jason