Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c++ - What is causing boost::lower to fail an is_singular assertion? -


i getting odd behavior boost::lower, when called on std::wstring. in particular, have seen following assertion fail in release build (but not in debug build):

assertion failed: !is_singular(), file c:\boost_1_40_0\boost/range/iterator_range.hpp, line 281  

i have seen appear memory errors after calling boost::to_lower in contexts such as:

void test(const wchar_t* word) {     std::wstring buf(word);     boost::to_lower(buf);     ... } 

replacing calls boost::tolower(wstr) std::transform(wstr.begin(), wstr.end(), wstr.begin(), towlower) appears fix problem; i'd know what's going wrong.

my best guess perhaps problem has changing case of unicode characters -- perhaps encoding size of downcased character different encoding size of source character?

does have ideas might going on here? might if knew "is_singular()" means in context of boost, after doing few google searches wasn't able find documentation it.

relevant software versions: boost 1.40.0; ms visual studio 2008.

an iterator range should singular if it's been constructed default constructor (stores singular iterators, i.e doesn't represent range). it's rather hard believe boost's to_lower function manages create singular range, suggests problem might elsewhere (a result of undefined behavior, such using uninitialized variables might initialized known value in debug builds).

read more on heisenbugs.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -