#include<iostream>
#include <boost/static_assert.hpp>
template < int N>
struct is_power_of_two
{
enum { val = ( N > 1 ) & ! ( N & ( N - 1 ) ) } ;
//static_assert(val, "should use a power of 2 as template parameter");
BOOST_STATIC_ASSERT( val) ;
} ;
int main( )
{
std:: cout << is_power_of_two< 2 > :: val << "\n " ;
std:: cout << is_power_of_two< 3 > :: val << "\n " ;
}
ICAgICNpbmNsdWRlPGlvc3RyZWFtPgogICAgI2luY2x1ZGUgPGJvb3N0L3N0YXRpY19hc3NlcnQuaHBwPgogICAgIAogICAgdGVtcGxhdGU8aW50IE4+CiAgICBzdHJ1Y3QgaXNfcG93ZXJfb2ZfdHdvIAogICAgewogICAgICAgIGVudW0geyB2YWwgPSAoTiA+IDEpICYgIShOICYgKE4gLSAxKSkgfTsKICAgICAgICAvL3N0YXRpY19hc3NlcnQodmFsLCAic2hvdWxkIHVzZSBhIHBvd2VyIG9mIDIgYXMgdGVtcGxhdGUgcGFyYW1ldGVyIik7CiAgICAgICAgQk9PU1RfU1RBVElDX0FTU0VSVCh2YWwpOwogICAgfTsKICAgICAKICAgIGludCBtYWluKCkKICAgIHsKICAgICAgICAgICAgc3RkOjpjb3V0IDw8IGlzX3Bvd2VyX29mX3R3bzwyPjo6dmFsIDw8ICJcbiI7CiAgICAgICAgICAgIHN0ZDo6Y291dCA8PCBpc19wb3dlcl9vZl90d288Mz46OnZhbCA8PCAiXG4iOwogICAgfQ==