tags can't support VC's C++ std? but MinGW is OK!

General questions regarding the usage of CodeLite
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by eranif »

For me it shows everything.

Which VC are u using?

Eran
Make sure you have read the HOW TO POST thread
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

VS 2010 beta2 (VC10)

Microsoft (R) Program Maintenance Utility Version 10.00.21003.01
Copyright (C) Microsoft Corporation. All rights reserved.
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

Here is the string file.

Code: Select all

// string standard header
#pragma once
#ifndef _STRING_
#define _STRING_
#ifndef RC_INVOKED
#include <istream>

 #pragma pack(push,_CRT_PACKING)
 #pragma warning(push,3)

 #pragma warning(disable: 4189)
 #pragma warning(disable: 4172)

_STD_BEGIN
		// basic_string TEMPLATE OPERATORS
template<class _Elem,
	class _Traits,
	class _Alloc> inline
	basic_string<_Elem, _Traits, _Alloc> operator+(
		const basic_string<_Elem, _Traits, _Alloc>& _Left,
		const basic_string<_Elem, _Traits, _Alloc>& _Right)
	{	// return string + string
	basic_string<_Elem, _Traits, _Alloc> _Ans;
	_Ans.reserve(_Left.size() + _Right.size());
	_Ans += _Left;
	_Ans += _Right;
	return (_Ans);
	}

template<class _Elem,
	class _Traits,
	class _Alloc> inline
	basic_string<_Elem, _Traits, _Alloc> operator+(
		const _Elem *_Left,
		const basic_string<_Elem, _Traits, _Alloc>& _Right)
	{	// return NTCS + string
	basic_string<_Elem, _Traits, _Alloc> _Ans;
	_Ans.reserve(_Traits::length(_Left) + _Right.size());
	_Ans += _Left;
	_Ans += _Right;
	return (_Ans);
	}


............................


inline wstring to_wstring(long double _Val)
	{	// convert long double to wstring
	wchar_t _Buf[_MAX_EXP_DIG + _MAX_SIG_DIG + 64];

	_CSTD swprintf(_Buf,sizeof (_Buf) / sizeof (_Buf[0]),
		L"%Lg", _Val);
	return (wstring(_Buf));
	}
 #endif /* _HAS_CPP0X */
_STD_END

 #pragma warning(pop)
 #pragma pack(pop)

#endif /* RC_INVOKED */
#endif /* _STRING */

/*
 * Copyright (c) 1992-2009 by P.J. Plauger.  ALL RIGHTS RESERVED.
 * Consult your license regarding permissions and restrictions.
V5.20:0009 */
Loaden
CodeLite Enthusiast
Posts: 35
Joined: Sat May 02, 2009 1:56 pm
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by Loaden »

template<class _Elem,
class _Traits,
class _Alloc> inline
basic_string<_Elem, _Traits, _Alloc>&& operator+(
const basic_string<_Elem, _Traits, _Alloc>& _Left,
basic_string<_Elem, _Traits, _Alloc>&& _Right)
{ // return string + string
return (_STD move(_Right.insert(0, _Left)));
}

this string support C++0x's rvalue references . the new operator is '&&'
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by eranif »

I still cant find the declaration of std::string, only basic_string
Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: tags can't support VC's C++ std? but MinGW is OK!

Post by eranif »

For me, using VS2008. If I set the parser search path (from the main menu: "Settings | Tags Settings | Include Files") to

Code: Select all

C:\Program Files\Microsoft Visual Studio 9.0\VC\include
And using this code:

Code: Select all

#include <stdio.h>
#include <string>

int main(int argc, char **argv)
{
	std::basic_string<wchar_t> s;
	printf("hello world\n");
	return 0;
}
Completion works (without locating the typedef for string which is under #include <xstring>) - see image attached.
cc-vs2008.png
Eran
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
Post Reply