$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] 'is_palindrome' and 'const char*'
From: ÐайÑев ÐлекÑÐ°Ð½Ð´Ñ (zamazan4ik_at_[hidden])
Date: 2016-08-11 21:00:12
Hello. I have some question about some case for 'is_palindrome' algo.
'is_palindrome' algorithm checks a sequence - if sequence is a palindromeor empty, function returns true, in other cases returns false.
But in case e.g. "a" (is_palindrome("a")) result is false, because "a" = {'a', '\0'}. And maybe this behaviour is unexpected for users.
So... what do you think about it? Should I implement special version for const char* or not?
--Â
Best regards, Zaitsev Alexander