~ubuntu-branches/ubuntu/trusty/emscripten/trusty-proposed

« back to all changes in this revision

Viewing changes to system/include/libcxx/ios

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140119141240-jg1l42cc158j59tn
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
};
204
204
 
205
205
concept_map ErrorCodeEnum<io_errc> { };
206
 
error_code make_error_code(io_errc e);
207
 
error_condition make_error_condition(io_errc e);
208
 
storage-class-specifier const error_category& iostream_category;
 
206
error_code make_error_code(io_errc e) noexcept; 
 
207
error_condition make_error_condition(io_errc e) noexcept; 
 
208
storage-class-specifier const error_category& iostream_category() noexcept;
209
209
 
210
210
}  // std
211
211
 
216
216
#include <__locale>
217
217
#include <system_error>
218
218
 
 
219
#if __has_feature(cxx_atomic)
 
220
#include <atomic>     // for __xindex_
 
221
#endif
 
222
 
219
223
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
220
224
#pragma GCC system_header
221
225
#endif
319
323
    _LIBCPP_INLINE_VISIBILITY bool bad() const;
320
324
 
321
325
    _LIBCPP_INLINE_VISIBILITY iostate exceptions() const;
322
 
    _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __except);
 
326
    _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate);
323
327
 
324
328
    void __set_badbit_and_consider_rethrow();
325
329
    void __set_failbit_and_consider_rethrow();
363
367
    int*            __index_;
364
368
    size_t          __event_size_;
365
369
    size_t          __event_cap_;
 
370
#if __has_feature(cxx_atomic) && !defined(__EMSCRIPTEN__)
 
371
    static atomic<int> __xindex_;
 
372
#else
366
373
    static int      __xindex_;
 
374
#endif
367
375
    long*           __iarray_;
368
376
    size_t          __iarray_size_;
369
377
    size_t          __iarray_cap_;
380
388
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(io_errc)
381
389
 
382
390
template <>
383
 
struct _LIBCPP_TYPE_VIS is_error_code_enum<io_errc> : public true_type { };
 
391
struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<io_errc> : public true_type { };
384
392
 
385
393
#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
386
394
template <>
387
 
struct _LIBCPP_TYPE_VIS is_error_code_enum<io_errc::__lx> : public true_type { };
 
395
struct _LIBCPP_TYPE_VIS_ONLY is_error_code_enum<io_errc::__lx> : public true_type { };
388
396
#endif
389
397
 
390
398
_LIBCPP_FUNC_VIS
391
 
const error_category& iostream_category();
 
399
const error_category& iostream_category() _NOEXCEPT;
392
400
 
393
401
inline _LIBCPP_INLINE_VISIBILITY
394
402
error_code
395
 
make_error_code(io_errc __e)
 
403
make_error_code(io_errc __e) _NOEXCEPT
396
404
{
397
405
    return error_code(static_cast<int>(__e), iostream_category());
398
406
}
399
407
 
400
408
inline _LIBCPP_INLINE_VISIBILITY
401
409
error_condition
402
 
make_error_condition(io_errc __e)
 
410
make_error_condition(io_errc __e) _NOEXCEPT
403
411
{
404
412
    return error_condition(static_cast<int>(__e), iostream_category());
405
413
}
527
535
bool
528
536
ios_base::eof() const
529
537
{
530
 
    return __rdstate_ & eofbit;
 
538
    return (__rdstate_ & eofbit) != 0;
531
539
}
532
540
 
533
541
inline _LIBCPP_INLINE_VISIBILITY
534
542
bool
535
543
ios_base::fail() const
536
544
{
537
 
    return __rdstate_ & (failbit | badbit);
 
545
    return (__rdstate_ & (failbit | badbit)) != 0;
538
546
}
539
547
 
540
548
inline _LIBCPP_INLINE_VISIBILITY
541
549
bool
542
550
ios_base::bad() const
543
551
{
544
 
    return __rdstate_ & badbit;
 
552
    return (__rdstate_ & badbit) != 0;
545
553
}
546
554
 
547
555
inline _LIBCPP_INLINE_VISIBILITY
553
561
 
554
562
inline _LIBCPP_INLINE_VISIBILITY
555
563
void
556
 
ios_base::exceptions(iostate __except)
 
564
ios_base::exceptions(iostate __iostate)
557
565
{
558
 
    __exceptions_ = __except;
 
566
    __exceptions_ = __iostate;
559
567
    clear(__rdstate_);
560
568
}
561
569
 
562
570
template <class _CharT, class _Traits>
563
 
class _LIBCPP_TYPE_VIS basic_ios
 
571
class _LIBCPP_TYPE_VIS_ONLY basic_ios
564
572
    : public ios_base
565
573
{
566
574
public:
585
593
    _LIBCPP_ALWAYS_INLINE bool bad() const  {return ios_base::bad();}
586
594
 
587
595
    _LIBCPP_ALWAYS_INLINE iostate exceptions() const {return ios_base::exceptions();}
588
 
    _LIBCPP_ALWAYS_INLINE void exceptions(iostate __except) {ios_base::exceptions(__except);}
 
596
    _LIBCPP_ALWAYS_INLINE void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}
589
597
 
590
598
    // 27.5.4.1 Constructor/destructor:
591
599
    _LIBCPP_INLINE_VISIBILITY