<commit_before>// ==========================================================================
//                 SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2010, <NAME>, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of <NAME> or the FU Berlin nor the names of
//       its contributors may be used to endorse or promote products derived
//       from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL <NAME> OR THE FU BERLIN BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
// ==========================================================================

#ifndef SEQAN_HEADER_CHAINPOINT_H
#define SEQAN_HEADER_CHAINPOINT_H

namespace seqan
{


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//			Class ChainPoint_
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/*DISABLED
.Class.ChainPoint_:
..summary:Basic data structure to represent the end-point of a fragment for use in a RMT
..cat:Chaining
..signature:ChainPoint_< TFragType, TSpec >
..param.TFragType:Type of the class which represents the limits (multidimensional point) of an fragment.
..param.TSpec:Spec of the ChainPoint_.
..include:seqan/chaining.h
*/
	template< typename TFragType, typename TSpec >
	struct Spec< ChainPoint_< TFragType, TSpec > >
	{
		typedef TSpec Type;
	};

	template< typename TFragType, typename TSpec, typename TSize > inline
	typename Key< TFragType >::Type 
	key( ChainPoint_< TFragType, TSpec > & me,
			TSize dim )
	{
        SEQAN_ASSERT_MSG(me._coords != NULL, "point not initialized");
        //SEQAN_ASSERT_LEQ_MSG(dim, me._dim, "dim corrupted");
// Array bounds checking is broken in GCC 4.7.0 and at least the current (2012-09-18) 4.8 trunk.  We disable this check
// here locally for the broken compiler versions.  Also see the GCC bug tracker:
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53198
#if (__GNUC__ == 4) && ((__GNUC_MINOR__ == 7) && (__GNUC_PATCHLEVEL__ == 0) || (__GNUC_MINOR__ == 8) && (__GNUC_PATCHLEVEL__ == 0))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif  // #if (__GNUC__ == 4) && ((__GNUC_MINOR__ == 7) && (__GNUC_PATCHLEVEL__ == 0) || (__GNUC_MINOR__ == 8) && (__GNUC_PATCHLEVEL__ == 0))
		return me._coords[ dim ];
#if (__GNUC__ == 4) && ((__GNUC_MINOR__ == 7) && (__GNUC_PATCHLEVEL__ == 0) || (__GNUC_MINOR__ == 8) && (__GNUC_PATCHLEVEL__ == 0))
#pragma GCC diagnostic pop
#endif  // #if (__GNUC__ == 4) && ((__GNUC_MINOR__ == 7) && (__GNUC_PATCHLEVEL__ == 0) || (__GNUC_MINOR__ == 8) && (__GNUC_PATCHLEVEL__ == 0))
	}

	template< typename TFragType, typename TSpec, typename TSize > inline 
	typename Key< TFragType >::Type 
	key( const ChainPoint_< TFragType, TSpec > & me,
			TSize dim )
	{
        SEQAN_ASSERT_NEQ_MSG(me._coords, NULL, "point not initialized");
        //SEQAN_ASSERT_LEQ(dim, me._dim);
		return me._coords[ dim ];
	}

	template< typename TFragType, typename TSpec, typename TSize, typename TKey > inline 
	void 
	setKey( ChainPoint_< TFragType, TSpec > & me,
			TSize dim,
			TKey val )
	{
        //SEQAN_ASSERT_LEQ(dim, me._dim);
		me._coords[ dim ] = val;
	}
<commit_msg>[FIX] GCC has a bug with array bounds checking.<commit_after>// ==========================================================================
//                 SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2010, <NAME>, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of <NAME> or the FU Berlin nor the names of
//       its contributors may be used to endorse or promote products derived
//       from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
// ==========================================================================

#ifndef SEQAN_HEADER_CHAINPOINT_H
#define SEQAN_HEADER_CHAINPOINT_H

namespace seqan
{


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//			Class ChainPoint_
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/*DISABLED
.Class.ChainPoint_:
..summary:Basic data structure to represent the end-point of a fragment for use in a RMT
..cat:Chaining
..signature:ChainPoint_< TFragType, TSpec >
..param.TFragType:Type of the class which represents the limits (multidimensional point) of an fragment.
..param.TSpec:Spec of the ChainPoint_.
..include:seqan/chaining.h
*/
	template< typename TFragType, typename TSpec >
	struct Spec< ChainPoint_< TFragType, TSpec > >
	{
		typedef TSpec Type;
	};

	template< typename TFragType, typename TSpec, typename TSize > inline
	typename Key< TFragType >::Type
	key( ChainPoint_< TFragType, TSpec > & me,
			TSize dim )
	{
        SEQAN_ASSERT_MSG(me._coords != NULL, "point not initialized");
        SEQAN_ASSERT_LT_MSG((int)dim, (int)me._dim, "dim corrupted");
		return me._coords[ dim ];
	}

	template< typename TFragType, typename TSpec, typename TSize > inline
	typename Key< TFragType >::Type
	key( const ChainPoint_< TFragType, TSpec > & me,
			TSize dim )
	{
        SEQAN_ASSERT_NEQ_MSG(me._coords, NULL, "point not initialized");
        SEQAN_ASSERT_LT((int)dim, (int)me._dim);
		return me._coords[ dim ];
	}

	template< typename TFragType, unsigned int ISize, typename TSize > inline
	typename Key< TFragType >::Type
	key( ChainPoint_< TFragType, Array< ISize> > & me,
			TSize dim )
	{
	    SEQAN_ASSERT_LT((int)dim, (int)ISize);
	    return me._coords[ dim ];
    }

	template< typename TFragType, unsigned ISize, typename TSize > inline
	typename Key< TFragType >::Type
	key( ChainPoint_< TFragType, Array< ISize> > const & me,
			TSize dim )
	{
	    SEQAN_ASSERT_LT((int)dim, (int)ISize);
	    return me._coords[ dim ];
    }

	template< typename TFragType, typename TSpec, typename TSize, typename TKey > inline
	void
	setKey( ChainPoint_< TFragType, TSpec > & me,
			TSize dim,
			TKey val )
	{
        //SEQAN_ASSERT_LEQ(dim, me._dim);
		me._coords[ dim ] = val;
	}

{'fraction_non_alphanumeric': 0.1912368781378366, 'fraction_numerical': 0.006161570059333638, 'mean_word_length': 3.061631139944393, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1880293', 'n_tokens_mistral': 2678, 'n_tokens_neox': 2373, 'n_words': 908}